true-myth
Version:
A library for safe functional programming in JavaScript, with first-class support for TypeScript
24 lines • 946 B
TypeScript
/**
@module
@internal
*/
/**
* Check if the value here is an all-consuming monstrosity which will consume
* everything in its transdimensional rage. A.k.a. `null` or `undefined`.
*
* @internal
*/
export declare const isVoid: (value: unknown) => value is undefined | null;
/** @internal */
export declare function curry1<T, U>(op: (t: T) => U, item?: T): U | ((t: T) => U);
export declare function safeToString(value: unknown): string;
export declare function identity<T>(value: T): T;
/**
This is the standard *correct* definition for a function which is a proper
subtype of all other functions: parameters of a function subtype must be
*wider* than those of the base type, and return types must be *narrower*.
Everything is wider than `never[]` and narrower than `unknown`, so any
function is assignable to places this is used.
*/
export type AnyFunction = (...params: never[]) => unknown;
//# sourceMappingURL=utils.d.ts.map