Options
All
  • Public
  • Public/Protected
  • All
Menu

Module function/always

Index

References

Functions

References

Renames and re-exports always

Functions

  • always<T>(x: T): () => T
  • Returns a function that always returns the given value. Note that for non-primitives the value returned is a reference to the original value.

    example
     var t = always('Tee');
    t(); //=> 'Tee'

    Type parameters

    • T

    Parameters

    • x: T

      The value to wrap in a function

    Returns () => T

      • (): T
      • Returns T

Generated using TypeDoc