alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
13 lines (12 loc) • 908 B
TypeScript
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;