Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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>;