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
197 stars 21 forks source link

Issue with react useCallback and other functions which are typed to return the function given. #19

Closed UncleClapton closed 4 years ago

UncleClapton commented 4 years ago

Hey there! It seems like this plugin is getting confused by react's useCallback function, and other memoization funcs.

if the function you're passing accepts no arguments, the name displayed appears like this:

When the function accepts an argument, the name takes on whatever name that argument is.

In both of these cases, the name given to this parameter should be callback

yume-chan commented 4 years ago

Duplicate of #10

UncleClapton commented 4 years ago

Ah totally missed that one. I'll close this one then.