TypeScript/tests/cases/fourslash/completionsDiscriminatedUnion.ts
Andy 204b70d7af
Don't add completions from a discriminated union type when the discriminant doesn't match (#24770)
* Don't add completions from a discriminated union type when the discriminant doesn't match

* Move code to checker

* Update API (#24966)

* Use isTypeIdenticalTo
2018-07-03 17:05:51 -07:00

8 lines
216 B
TypeScript

/// <reference path="fourslash.ts" />
////interface A { kind: "a"; a: number; }
////interface B { kind: "b"; b: number; }
////const c: A | B = { kind: "a", /**/ };
verify.completions({ marker: "", exact: ["a"] });