Ask coding questions

← Back to all posts
Importing Typescript libraries wit @types
OctavicSensei (14)

I'm trying to import lodash, which is an npm module with its type declaration stored under @types/lodash. Pretty common for TS modules. But I was unable to import the library. Without adding @types/lodash I get compiler error, with it everything I import from the library is undefined.

Seems to be a problem in module resolution.

OctavicSensei (14)

Bumping because this is still broken, and is pretty much preventing me from using TypeScript entirely