Hacker News new | ask | show | jobs
by dizzy3gg 1696 days ago
I don’t think it actually does though, I think the defaults give you a hint to run npm i
1 comments

How does it know which packages to install for a given un-typed package?
Pretty much all community types come from a single repository with a consistent naming scheme. For example, if you use “lodash”, types are available via “@types/lodash” from DefinitelyTyped (the DT repo is now maintained by the typescript team). This is even tracked on npm. VS code can just see if “@types/$package” exists and then prompt you to add it