@thisisagile/easy-react
Version:
Straightforward library building micro applications in react
12 lines (11 loc) • 1.17 kB
TypeScript
import { List, Optional, PageList, PageOptions, Validatable } from '@thisisagile/easy';
export declare const useToggle: (initialState?: boolean) => [boolean, () => void];
export declare const useA: <E extends Validatable>(item?: Partial<E>) => [E, (e: E) => E];
export declare const useAn: <E extends Validatable>(item?: Partial<E>) => [E, (e: E) => E];
export declare const useOptional: <E>(item?: Partial<E>) => [E, (e: Optional<E>) => Optional<E>, () => Optional<E>];
export declare const useEntity: <E extends Validatable>(item?: Partial<E>) => [E, (e: E) => E];
export declare const useList: <E>(...items: E[]) => [List<E>, (e: List<E>) => List<E>];
export declare const usePageList: <E>(...items: E[]) => [PageList<E>, (e: PageList<E>) => PageList<E>];
export declare const usePaging: <E>(f: (options?: PageOptions) => Promise<PageList<E>>, options?: PageOptions) => [PageList<E>, (options?: PageOptions) => Promise<PageList<E>>, boolean, number, number];
export declare const useGet: <E>(f: () => Promise<E>, initial?: Partial<E>) => [E, () => Promise<E>];
export declare const useGetList: <E>(f: () => Promise<List<E>>) => [List<E>, () => Promise<PageList<E>>];