mocoolka-function
Version:
Function lib for function.
13 lines (12 loc) • 464 B
TypeScript
/**
* Returns a new function that will return the given value.Note that for
* non-primitives the value returned is a reference to the original value.
*
* This function is known as `const`, `always`, or `K` (for K combinator) in
* other languages and libraries.
* @since v0.1.0
* @param value -The value to wrap in a function
* @return The function return value
*/
declare const constant: (value: any) => () => any;
export default constant;