Merge pull request #15242 from seansfkelley/validation-map

react: Make ValidationMap only accept keys from T.
This commit is contained in:
Paul van Brenk
2017-03-21 14:06:16 -07:00
committed by GitHub
+1 -3
View File
@@ -2627,9 +2627,7 @@ declare namespace React {
isRequired: Validator<T>;
}
interface ValidationMap<T> {
[key: string]: Validator<T>;
}
type ValidationMap<T> = { [K in keyof T]?: Validator<T> };
interface ReactPropTypes {
any: Requireable<any>;