UNPKG

@modular-forms/react

Version:

The modular and type-safe form library for React

11 lines (10 loc) 314 B
import type { Signal } from '@preact/signals-react'; /** * 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;