-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode struggles to auto-import lodash #4062
Comments
Hi @tnrich! I'm not too sure. You might have better luck on the vscode repo. I'm going to guess maybe it has to do with the way they prioritize their typing hints. |
Hey @jdalton! Thanks for the quick response. It's possible that vscode needs to do something on their end, but... this functionality does seem to work fine with most other popular packages. That makes me think it probably has something to do with how lodash is exporting its modules or how lodash is arranging its declaration files. If most other packages work it seems like one as popular as lodash should work as well. |
Any response to this sentiment @jdalton :
? It seems like it could be fixed on our end? (And maybe has to because I'm not really getting anywhere with microsoft/vscode#63239 and microsoft/TypeScript#29039) Thanks! |
Lodash is a popular package (the most popular in fact) so the pressure, if the issue is wide spread enough, should raise the priority for vscode. You're likely seeing an issue with |
To just fix the problem I do the following:
and maybe If you want some functionality from lodash that is not part of lodash es, like runInContext, install it under an alias:
|
|
Adding @types does not make it work for me. This is still an annoying issue. |
Hey there, does anyone know why vscode struggles to auto-import lodash modules?
Here I'm looking for lodash's array.compact method, but while recompose has an auto-import suggested, lodash's auto-import doesn't seem to want to show up:
If this could be remedied that would be awesome because lodash is a great library!
The text was updated successfully, but these errors were encountered: