Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

LinkedListCallback<T>: (value: T, index: number, list: LinkedList<T>) => void

Type parameters

  • T

    the type of each value in the list

Type declaration

    • (value: T, index: number, list: LinkedList<T>): void
    • The type for any callback function we support. Modelled after the callback function defined for Array.forEach.

      The function is called with 3 parameters:

      • value is the value of the element in the list
      • index is the position of that value in the list, with 0 being the first index
      • list is the linked list itself

      Parameters

      Returns void

LinkedListPredicate<T>: (value: T, index: number, list: LinkedList<T>) => boolean

Type parameters

  • T

    the type of each value in the list

Type declaration

    • (value: T, index: number, list: LinkedList<T>): boolean
    • The type for any predicate function we support. Modelled after the predicates supported by Array.

      The predicate function is called with 3 parameters:

      • value is the value of the element in the list
      • index is the position of that value in the list, with 0 being the first index
      • list is the linked list itself

      The predicate function returns true if the predicate is successful, or false otherwise.

      Parameters

      Returns boolean

MapCallback<T, U>: (value: T, index: number, list: LinkedList<T>) => U

Type parameters

  • T

    the type of each value in the original list

  • U

    the type returned by the callback

Type declaration

    • The type for a callback function used in the map method. Modelled after the callback function defined for Array.map.

      The function is called with 3 parameters:

      • value is the value of the element in the list
      • index is the position of that value in the list, with 0 being the first index
      • list the LinkedList the map() was called on
      see

      LinkedList.map

      Parameters

      Returns U

ReadonlyLinkedListNode<T>: Readonly<LinkedListNode<T>>

A node in a singly-linked list that is only readable.

Type parameters

  • T

    the type of each value in the list

RecursiveLinkedList<T>: LinkedList<T | RecursiveLinkedList<T>>

The shape of a recursive or nested LinkedList.

Type parameters

  • T

ReduceCallback<T>: (accumulator: T, currentValue: T, currentIndex: number, list: LinkedList<T>) => T

Type parameters

  • T

    the type of each value in the original list

Type declaration

    • (accumulator: T, currentValue: T, currentIndex: number, list: LinkedList<T>): T
    • The type for a callback function used in the reduce method. Modelled after the callback function defined for Array.reduce.

      The function is called with 3 parameters:

      • accumulator is the value resulting from the previous call to the function
      • currentValue the value of the current element in the list
      • currentIndex the index position of currentValue in the list
      • list the list upon which reduce was called
      see

      LinkedList.reduce

      Parameters

      • accumulator: T
      • currentValue: T
      • currentIndex: number
      • list: LinkedList<T>

      Returns T

Generated using TypeDoc