mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Make React.ValidationMap only accept keys from T.
This commit is contained in:
4
react/index.d.ts
vendored
4
react/index.d.ts
vendored
@@ -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