UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

13 lines (12 loc) 908 B
import { Field, FieldOptions } from 'alinea/core'; export declare function useField<Value, Mutator, Options extends FieldOptions<Value>>(field: Field<Value, Mutator, Options> | string): { fieldKey: string; label: string; options: Awaited<Options>; value: Awaited<Value>; mutator: Mutator; }; export declare function useFieldKey<Value, Mutator, Options extends FieldOptions<Value>>(field: Field<Value, Mutator, Options>): string; export declare function useFieldOptions<Value, Mutator, Options extends FieldOptions<Value>>(field: Field<Value, Mutator, Options>): Awaited<Options> | Awaited<Options>; export declare function useFieldValue<Value, Mutator, Options extends FieldOptions<Value>>(field: Field<Value, Mutator, Options>): Awaited<Value>; export declare function useFieldMutator<Value, Mutator, Options extends FieldOptions<Value>>(field: Field<Value, Mutator, Options>): Mutator;