1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export type EventSend<T = any> = {
|
7 | ctr?: AbortController;
|
8 | scenario?: string;
|
9 | params?: Record<string, any>;
|
10 | data?: (scenario?: string | boolean) => Partial<T>;
|
11 | keys?: (scenario?: boolean | string) => { name: string; keys: string[] }[];
|
12 | parser?: (value: any) => void;
|
13 | };
|
14 |
|
15 | type FixArr<T> = T extends readonly any[]
|
16 | ? Omit<T, Exclude<keyof any[], number>>
|
17 | : T;
|
18 | type DropInitDot<T> = T extends `.${infer U}` ? U : T;
|
19 | type _DeepKeys<T> = T extends object
|
20 | ? {
|
21 | [K in (string | number) & keyof T]: `${
|
22 | | `.${K}`
|
23 | | (`${K}` extends `${number}` ? `.${K}` : never)}${
|
24 | | ""
|
25 | | _DeepKeys<FixArr<T[K]>>}`;
|
26 | }[(string | number) & keyof T]
|
27 | : never;
|
28 | export type DeepKeys<T> = DropInitDot<_DeepKeys<FixArr<T>>>;
|
29 |
|
30 | export { default as UseMutation, UseMutationProps } from "./useMutation";
|
31 | export {
|
32 | default as UseTable,
|
33 | UseTablePagination,
|
34 | UseTablePaginationProps,
|
35 | } from "./useTable";
|
36 | export { default as UseFetch } from "./useFetch";
|
37 | export { default as UseSvalidation } from "./useSValidation";
|
38 |
|
\ | No newline at end of file |