UNPKG

syncbasestore

Version:

Lightweight reactive store with built-in filtering and async state handling

9 lines (8 loc) 359 B
import { SyncBaseStore } from '../store/SyncBaseStore'; import { FieldStatus, FormState } from '../store/types'; export declare function buildBase<T>(store: SyncBaseStore<FormState<T>>): { setField: <K extends keyof T>(key: K, value: T[K], validator?: (value: T[K]) => { status: FieldStatus["status"]; message?: string; }) => void; };