Variable FunctionHelpersConst

FunctionHelpers: {
    attribute: (<T, U>(attributeName) => ((value) => undefined | U));
    identity: (() => (<T>(value) => T));
    identityAs: (() => (<T>(value) => T));
    void: (() => (() => void));
} = ...

Type declaration

  • attribute: (<T, U>(attributeName) => ((value) => undefined | U))

    A function that extracts an attribute from the given value.

    Param: attributeName

    The name of the attribute to extract.

    Returns

    a function that extract the attrobute from the given object.

      • <T, U>(attributeName): ((value) => undefined | U)
      • A function that extracts an attribute from the given value.

        Type Parameters

        • T

        • U

        Parameters

        • attributeName: string

          The name of the attribute to extract.

        Returns ((value) => undefined | U)

        a function that extract the attrobute from the given object.

          • (value): undefined | U
          • Parameters

            • value: T

            Returns undefined | U

  • identity: (() => (<T>(value) => T))

    A function that returns the exact given value.

    Param: value

    The value parameter of the function.

    Returns

    a function that returns the exact given value.

      • (): (<T>(value) => T)
      • A function that returns the exact given value.

        Returns (<T>(value) => T)

        a function that returns the exact given value.

          • <T>(value): T
          • Type Parameters

            • T

            Parameters

            • value: T

            Returns T

  • identityAs: (() => (<T>(value) => T))

    A function that returns the given value casted to the given type.

    Param: value

    The value parameter of the function.

    Returns

    a function that returns the given value casted to the given type.

      • (): (<T>(value) => T)
      • A function that returns the given value casted to the given type.

        Returns (<T>(value) => T)

        a function that returns the given value casted to the given type.

          • <T>(value): T
          • Type Parameters

            • T

            Parameters

            • value: unknown

            Returns T

  • void: (() => (() => void))

    A void function.

    Returns

    a void function.

      • (): (() => void)
      • A void function.

        Returns (() => void)

        a void function.

          • (): void
          • Returns void

Generated using TypeDoc