@politie/sherlock-utils
Version:
Utility functions that are designed to work with Sherlock. His toolbelt.
20 lines (19 loc) • 639 B
TypeScript
import { Derivable } from '@politie/sherlock';
/**
* Performs JavaScript `&&` operation on the provided arguments after unwrapping.
*
* @method
*/
export declare const and: <V>(...args: (V | Derivable<V>)[]) => Derivable<NonNullable<V>>;
/**
* Performs JavaScript `||` operation on the provided arguments after unwrapping.
*
* @method
*/
export declare const or: <V>(...args: (V | Derivable<V>)[]) => Derivable<NonNullable<V>>;
/**
* Returns the first operand that is not `null` or `undefined` after unwrapping.
*
* @method
*/
export declare const firstNotNull: <V>(...args: (V | Derivable<V>)[]) => Derivable<NonNullable<V>>;