From 83b529136cf6cea538d99a7d6664395b9fdb7732 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 5 Sep 2018 11:21:31 -0700 Subject: [PATCH] react: Comment out intersection type test (#28535) --- types/react/test/tsx.tsx | 11 ++++++----- types/react/v15/test/tsx.tsx | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) 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' }); +// } +// }