@alifd/meet-react
Version:
Fusion Mobile React UI System Component
23 lines (22 loc) • 1.04 kB
TypeScript
import { Dispatch, SetStateAction } from 'react';
export declare function useValue<T>(props: any, defaultValue: T, options?: {
valueName?: string;
fitValue?: (v: any) => T;
compare?: (v1: T, v2: T) => boolean;
}): [T, Dispatch<SetStateAction<T>>, boolean, Dispatch<SetStateAction<T>>];
export declare function useDeprecated(comp: string, props: any, oldName: string, newName: string, defaultValue?: any): any;
export declare function guid(prefix?: string): string;
export declare function useGuid(prefix?: string): string;
export declare function useForceUpdate(): () => void;
export type IProps = {
[key: string]: any;
};
export default function useWhyDidYouUpdate(componentName: string, props: IProps): void;
export interface DebounceOption {
leading?: boolean;
}
export interface DebouncedFunction<Args extends any[]> {
(...args: Args): void;
cancel(): void;
}
export declare function useDebounce<Args extends any[]>(func: (...args: Args) => any, wait?: number, options?: DebounceOption): DebouncedFunction<Args>;