TypeScript/tests/cases/fourslash/tsxCompletionUnionElementType.ts
Wesley Wigham 08022d57c8
Allow calls on unions of dissimilar signatures (#29011)
* Add core of new union signature logic and test - needs intersection signature logic to fully work

* Add inversion of variance for class props lookup from union sig returns

* Fix lints

* Combine parameter names for nicer quick info

* PR feedback 1

* Fix miscopy

* PR feedback round 2

* Remove argument name combining because loc :(

* Nit cleanup round 3

* Reinline getTupleTypeForArgumentAtPos

* Remove a tad more

* No step on sneky off-by-one error
2018-12-19 16:35:01 -08:00

23 lines
572 B
TypeScript

/// <reference path='fourslash.ts' />
//@Filename: file.tsx
// @jsx: preserve
// @skipLibCheck: 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>;
//// }
//// var SFCComp = SFC1 || SFC2;
//// <SFCComp /**/ />
verify.completions({ marker: "", exact: ["x"] });