Object member completions are offered from all union constituents even after union has been discriminated #39438
Labels
Bug
A bug in TypeScript
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Milestone
TypeScript Version: 3.9.5 (probably more)
Search Terms:
Code
Expected behavior:

When you use autocompletion to replace
X_OR_Y
byx
ory
, the editor should suggesty
, only:Actual behavior:

The editor suggests both
x
ory
:Of course, if you choose
x
, the compiler will then complain about the wrongly typed assignment.Playground Link:
Playground
Related Issues:
The text was updated successfully, but these errors were encountered: