uncontrollable
Advanced tools
Comparing version 8.0.3 to 8.0.4
@@ -0,1 +1,12 @@ | ||
## [8.0.4](https://github.com/jquense/uncontrollable/compare/v8.0.3...v8.0.4) (2023-07-28) | ||
### Bug Fixes | ||
* types too strict ([2c135fb](https://github.com/jquense/uncontrollable/commit/2c135fbce2dc05f11bbb736a88400aed90d6bbac)) | ||
## [8.0.3](https://github.com/jquense/uncontrollable/compare/v8.0.2...v8.0.3) (2023-07-28) | ||
@@ -2,0 +13,0 @@ |
@@ -1,5 +0,5 @@ | ||
export type Handler<TProp = any> = (prop: TProp, ...args: any[]) => any; | ||
export type Handler = (value: any, ...args: any[]) => any; | ||
export declare function defaultKey(key: string): string; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler<TProp> = Handler<TProp>>(propValue: TProp | undefined, defaultValue: TProp, handler?: THandler): readonly [TProp, THandler]; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler<TProp> = Handler<TProp>>(propValue: TProp | undefined, defaultValue?: TProp | undefined, handler?: THandler): readonly [ | ||
declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue: TProp, handler?: THandler): readonly [TProp, THandler]; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue?: TProp | undefined, handler?: THandler): readonly [ | ||
TProp | undefined, | ||
@@ -6,0 +6,0 @@ (...args: Parameters<THandler>) => ReturnType<THandler> | void |
@@ -1,5 +0,5 @@ | ||
export type Handler<TProp = any> = (prop: TProp, ...args: any[]) => any; | ||
export type Handler = (value: any, ...args: any[]) => any; | ||
export declare function defaultKey(key: string): string; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler<TProp> = Handler<TProp>>(propValue: TProp | undefined, defaultValue: TProp, handler?: THandler): readonly [TProp, THandler]; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler<TProp> = Handler<TProp>>(propValue: TProp | undefined, defaultValue?: TProp | undefined, handler?: THandler): readonly [ | ||
declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue: TProp, handler?: THandler): readonly [TProp, THandler]; | ||
declare function useUncontrolledProp<TProp, THandler extends Handler = Handler>(propValue: TProp | undefined, defaultValue?: TProp | undefined, handler?: THandler): readonly [ | ||
TProp | undefined, | ||
@@ -6,0 +6,0 @@ (...args: Parameters<THandler>) => ReturnType<THandler> | void |
{ | ||
"name": "uncontrollable", | ||
"version": "8.0.3", | ||
"version": "8.0.4", | ||
"description": "Wrap a controlled react component, to allow specific prop/handler pairs to be uncontrolled", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25597
253