Right now, function overload matching is pretty naive.
The biggest issue with this is autocomplete doesn't take into account discriminated unions, for example:
Assume we have some function with 3 overloads like so, where the 1st arg determines the expected type of the second
MyFunc(<enum: "A">, <int>)
MyFunc(<enum: "B">, <string>)
MyFunc(<enum: "C">, <ref>)
If completion evaluates while the cursor is here, we only see A currently, where we should probably see A, B, and C.
In effect, all overloads valid up to the current argument should provide completions for the best DX
Right now, function overload matching is pretty naive.
The biggest issue with this is autocomplete doesn't take into account discriminated unions, for example:
Assume we have some function with 3 overloads like so, where the 1st arg determines the expected type of the second
If completion evaluates while the cursor is here, we only see
Acurrently, where we should probably seeA,B, andC.In effect, all overloads valid up to the current argument should provide completions for the best DX