better-prop-types
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
@@ -0,1 +1,8 @@ | ||
# [1.0.0-alpha.3](https://github.com/ivangabriele/better-prop-types/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2021-11-20) | ||
### Features | ||
* attach new modifiers to oneOf() validator ([e4f9233](https://github.com/ivangabriele/better-prop-types/commit/e4f92339fab2f5b812103c326cb394427f2654c4)) | ||
# [1.0.0-alpha.2](https://github.com/ivangabriele/better-prop-types/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-11-20) | ||
@@ -2,0 +9,0 @@ |
@@ -55,3 +55,3 @@ import PropTypes from 'prop-types'; | ||
const objectOf = Object.assign(PropTypes.objectOf); | ||
const oneOf = Object.assign(PropTypes.oneOf); | ||
const oneOf = types => createBetterChainableTypeChecker(PropTypes.oneOf(types)); | ||
const oneOfType = Object.assign(PropTypes.oneOfType); | ||
@@ -58,0 +58,0 @@ const shape = Object.assign(PropTypes.shape); |
@@ -7,3 +7,3 @@ import PropTypes, { InferProps, InferType, Requireable, ValidationMap, Validator } from 'prop-types'; | ||
}>; | ||
declare type OneOf = <T>(types: ReadonlyArray<T>) => Requireable<T>; | ||
declare type OneOf = <T>(types: ReadonlyArray<T>) => Isable<T>; | ||
declare type OneOfType = <T extends Validator<any>>(types: T[]) => Requireable<NonNullable<InferType<T>>>; | ||
@@ -10,0 +10,0 @@ declare type Shape = <P extends ValidationMap<any>>(type: P) => Requireable<InferProps<P>>; |
{ | ||
"name": "better-prop-types", | ||
"description": "Better PropTypes.", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-alpha.3", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "type": "module", |
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
19970
14
122