Search code examples
typescriptlodashnpm-installtypescript-typingsdefinitelytyped

How do I install lodash v3 Typescript typings


Unfortunately I cannot upgrade to lodash 4 right now. So, I'm trying to use the v3 typings provided in https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash , which has a v3 folder with lodash 3 typings. However, when I do npm install @types/lodash --save-dev the v3 folder is not there. All I see is the common and 'fp' folder.


Solution

  • Just run:

    npm install --save-dev @types/[email protected]
    

    You can see what other 3.* versions are available on the npm page: https://www.npmjs.com/package/@types/lodash