@modular-forms/preact
Version:
The modular and type-safe form library for Preact
11 lines (10 loc) • 308 B
TypeScript
import type { Signal } from '@preact/signals';
/**
* It reads the value of a signal via .value or .peek().
*
* @param signal The signal to be read.
* @param peek Whether to subscribe.
*
* @returns The value of the signal.
*/
export declare function readSignal<T>(signal: Signal<T>, peek: boolean): T;