imliam / vscode-inline-parameters

An extension for Visual Studio Code that adds inline parameter annotations when calling a function.
https://marketplace.visualstudio.com/items?itemName=liamhammett.inline-parameters
MIT License
196 stars 22 forks source link

[JavaScript] parameter split error with generics #46

Open Tsuk1ko opened 3 years ago

Tsuk1ko commented 3 years ago

image

The third parameter should be accumulator. It seems that the comma in generics make parameter splitting wrong.

AnthonyLenglet commented 3 years ago

Confirming that something is wrong with the way its parsing the definition of the function, in the case shwon below, it should pick up op2, and it is picking up Project right before it instead

image

trying to add a parameter after this confirms this by calling it op2

image

I'm guessing the issue resides in this split right here https://github.com/imliam/vscode-inline-parameters/blob/master/src/drivers/abstract-javascript.ts#L25