Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112
  1. export declare type Handler = (...args: any[]) => any;
  2. declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue: TProp, handler?: THandler): readonly [TProp, THandler];
  3. declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue?: TProp | undefined, handler?: THandler): readonly [TProp | undefined, THandler];
  4. export { useUncontrolledProp };
  5. declare type FilterFlags<Base, Condition> = {
  6. [Key in keyof Base]: NonNullable<Base[Key]> extends Condition ? Key : never;
  7. };
  8. declare type AllowedNames<Base, Condition> = FilterFlags<Base, Condition>[keyof Base];
  9. declare type ConfigMap<TProps extends object> = {
  10. [p in keyof TProps]?: AllowedNames<TProps, Function>;
  11. };
  12. export default function useUncontrolled<TProps extends object, TDefaults extends string = never>(props: TProps, config: ConfigMap<TProps>): Omit<TProps, TDefaults>;