add PropTypes.exact (#27996)

This commit is contained in:
Ferdy Budhidharma
2018-08-09 18:56:57 +01:00
committed by John Reilly
parent 5ead03ec10
commit b64d3c7f23
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -47,6 +47,7 @@ export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<Non
export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T; }>;
export function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>;
export function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>;
/**
* Assert that the values match with the type specs.
+1
View File
@@ -2228,6 +2228,7 @@ declare namespace React {
arrayOf: typeof PropTypes.arrayOf;
objectOf: typeof PropTypes.objectOf;
shape: typeof PropTypes.shape;
exact: typeof PropTypes.exact;
}
//