tern icon indicating copy to clipboard operation
tern copied to clipboard

Overloading of methods

Open sebasmoyano opened this issue 8 years ago • 4 comments
trafficstars

How can add autocomplete support for methods with same name and different parameters?

sebasmoyano avatar Oct 17 '17 14:10 sebasmoyano

It's not possible if I remember.

angelozerr avatar Oct 17 '17 19:10 angelozerr

The way we're modeling this is as a union type of the different function types, i.e. fn(string) → string | fn(number) → +Object. It doesn't work perfectly yet, though.

marijnh avatar Oct 18 '17 07:10 marijnh

I put what you defined in the "!type" field and it didn't work. Do you have a def example?

sebasmoyano avatar Oct 18 '17 14:10 sebasmoyano

@marijnh Do you have a def example for what you said?

sebasmoyano avatar Nov 07 '17 20:11 sebasmoyano