Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "_shared/types"

Index

Type aliases

FilterFunction

FilterFunction<T>: (currentValue: T) => boolean

A callback function used in a structure traversal. It takes the current value as input and returns a boolean describing whether or not the value should be present in the filtered structure.

Type parameters

  • T

Type declaration

    • (currentValue: T): boolean
    • Parameters

      • currentValue: T

      Returns boolean

MapFunction

MapFunction<T, U>: (currentValue: T) => U

A callback function used in a structure traversal. It takes the current value as input and returns a new value that will replace the current one in the mapped structure.

Type parameters

  • T

  • U

Type declaration

    • (currentValue: T): U
    • Parameters

      • currentValue: T

      Returns U

ReduceFunction

ReduceFunction<T, U>: (accumulator: U, currentValue: T) => U

A callback function used in a structure traversal. It takes an accumulator and the current value as input and returns a value that will be the accumulator for the next value. The final result will be the last accumulator value at the end of traversaL.

Type parameters

  • T

  • U

Type declaration

    • (accumulator: U, currentValue: T): U
    • Parameters

      • accumulator: U
      • currentValue: T

      Returns U

TraverseCallback

TraverseCallback<T>: (currentValue: T) => any

A function called on each value encountered during a tree traversal.

Type parameters

  • T

Type declaration

    • (currentValue: T): any
    • Parameters

      • currentValue: T

      Returns any

Generated using TypeDoc