mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #15242 from seansfkelley/validation-map
react: Make ValidationMap only accept keys from T.
This commit is contained in:
Vendored
+1
-3
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user