diff --git a/types/react/test/tsx.tsx b/types/react/test/tsx.tsx index 3105a3347b..8f0e11aea5 100644 --- a/types/react/test/tsx.tsx +++ b/types/react/test/tsx.tsx @@ -127,11 +127,12 @@ export abstract class SetStateTestForExtendsState
extends React.Component
{ - foo() { - this.setState({ baseProp: 'foobar' }); - } -} +// This is invalid because 'S' may specify a different type for `baseProp`. +// export abstract class SetStateTestForAndedState
extends React.Component
{ +// foo() { +// this.setState({ baseProp: 'foobar' }); +// } +// } interface NewProps { foo: string; } interface NewState { bar: string; } diff --git a/types/react/v15/test/tsx.tsx b/types/react/v15/test/tsx.tsx index 289a912a3f..e79e5b5f7f 100644 --- a/types/react/v15/test/tsx.tsx +++ b/types/react/v15/test/tsx.tsx @@ -100,8 +100,9 @@ export abstract class SetStateTestForExtendsState
extends React.Component
{ - foo() { - this.setState({ baseProp: 'foobar' }); - } -} +// This is invalid because 'S' may specify a different type for `baseProp`. +// export abstract class SetStateTestForAndedState
extends React.Component
{ +// foo() { +// this.setState({ baseProp: 'foobar' }); +// } +// }