-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
22 lines (20 loc) · 1.51 KB
/
index.d.ts
File metadata and controls
22 lines (20 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import type { FormDataType, FormField, UseFormChangeResult, IntervalHook, DebounceOptions, DebounceFn, ThrottleOptions, ThrottledFn, UseMockRequestReturn } from './types';
declare module 'react-native-orzhtml-usecom' {
export function useDebounce<T extends (...args: any[]) => any>(func: T, config: number | DebounceOptions): DebounceFn<T>;
export function useFormChange<T extends Record<string, FormField<any, FormDataType>>>(
initialState: T,
configs?: { errMessage: string },
): UseFormChangeResult<T>;
export function useInterval(): IntervalHook;
export function useLatest<T>(value: T): React.MutableRefObject<T>;
export function useMockRequest<T = any>(): UseMockRequestReturn<T>;
export function useSingleInstanceVar<T extends Record<string, any>>(initialValue: T): T;
export function useSingleState<T>(initialState: T | (() => T)): [T, (partialStates: Partial<T>, callback?: (state: T) => void) => void];
export function useStateCB<T>(initialState: T | (() => T)): [() => T, (partialStates: Partial<T>, callback?: (state: T) => void) => void];
export function useThrottle<T extends (...args: any[]) => any>(func: T, config: number | ThrottleOptions): ThrottledFn<T>;
export function useTimeout(): readonly [(fn: Function, delay: number) => void, () => void];
export function useUnmountedRef(): React.MutableRefObject<boolean>;
export function useUpdate(): () => void;
export function useWorkdayCalculator(initialDate: Date): Date;
}