Closed
Description
Bug Report
🔎 Search Terms
union of types on function overload
function overloading not showing arguments in object with intellisense
🕗 Version & Regression Information
- This is the behavior in every version I tried, including 4.5.4 and the nightly, and I reviewed the FAQ for entries about function overloading.
⏯ Playground Link
Playground link with relevant code
💻 Code
type X = {
a: number;
};
type Y = {
a: number;
b: string;
};
function f(args: X): void;
function f(args: Y): void;
function f(args: X | Y){}
f({
a: 7,
|
})
Trigger completions at |
🙁 Actual behavior
No further completion suggestions are returned.
🙂 Expected behavior
A suggestion for both b
should be returned as that is a valid option if args
is of type Y
.