2017-02-09 21:40:08 +01:00
|
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
|
|
//@Filename: file.tsx
|
|
|
|
|
// @jsx: preserve
|
|
|
|
|
// @noLib: true
|
|
|
|
|
|
|
|
|
|
//// declare module JSX {
|
|
|
|
|
//// interface Element { }
|
|
|
|
|
//// interface IntrinsicElements {
|
|
|
|
|
//// }
|
|
|
|
|
//// interface ElementAttributesProperty { props; }
|
|
|
|
|
//// }
|
|
|
|
|
//// function SFC1(prop: { x: number }) {
|
|
|
|
|
//// return <div>hello </div>;
|
|
|
|
|
//// };
|
|
|
|
|
|
|
|
|
|
//// function SFC2(prop: { x: boolean }) {
|
|
|
|
|
//// return <h1>World </h1>;
|
|
|
|
|
//// }
|
|
|
|
|
|
2019-06-13 21:25:02 +02:00
|
|
|
|
//// [|var [|{| "isWriteAccess": true, "isDefinition": true, "contextRangeIndex": 0 |}SFCComp|] = SFC1 || SFC2;|]
|
|
|
|
|
//// [|<[|{| "contextRangeIndex": 2 |}SFCComp|] x={ "hi" } />|]
|
2017-02-09 21:40:08 +01:00
|
|
|
|
|
2018-05-07 19:08:38 +02:00
|
|
|
|
verify.singleReferenceGroup(`var SFCComp: ((prop: {
|
|
|
|
|
x: number;
|
|
|
|
|
}) => JSX.Element) | ((prop: {
|
|
|
|
|
x: boolean;
|
2019-06-05 23:10:51 +02:00
|
|
|
|
}) => JSX.Element)`, "SFCComp");
|