@politie/sherlock-utils
Version:
Utility functions that are designed to work with Sherlock. His toolbelt.
14 lines (13 loc) • 682 B
TypeScript
import { Derivable, State } from '@politie/sherlock';
/**
* Returns the current state of the provided Derivable without registering any dependencies while in a derivation. Comparable to #getState().
*/
export declare function peekState<T>(d: Derivable<T>): State<T>;
/**
* Returns the current value of the provided Derivable without registering any dependencies while in a derivation. Comparable to #get().
*/
export declare function peek<T>(d: Derivable<T>): T;
/**
* Returns the current value of the provided Derivable without registering any dependencies while in a derivation. Comparable to #value.
*/
export declare function peekValue<T>(d: Derivable<T>): T | undefined;