From bcff64de551f279fa30469e7a236c2ffc9547c30 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 17 Sep 2019 13:12:49 +0200 Subject: [PATCH] test(react): Remove usage of React.Attributes (#38352) Only includes `key` with which you'll never deal in props validation --- types/react/test/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 7f8b13a437..8787c19d62 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -22,7 +22,7 @@ interface Console { log(...args: any[]): void; } -interface Props extends React.Attributes { +interface Props { hello: string; world?: string | null; foo: number; @@ -132,8 +132,7 @@ class ModernComponent extends React.Component static propTypes: React.ValidationMap = { hello: PropTypes.string.isRequired, world: PropTypes.string, - foo: PropTypes.number.isRequired, - key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]) as PropTypes.Validator + foo: PropTypes.number.isRequired }; static contextTypes: React.ValidationMap = {