likerRr likerRr - 4 days ago 4x
TypeScript Question

Where to get @types for single lodash package?

I need one function from lodash - assignin. I installed

and imported it in my project:

import assignIn = require('lodash.assignin');

But after compilation there is an error: "error TS2307: Cannot find module 'lodash.assignin'".

I understand that I need typings for
package, but unfortunately there is only
type in

I don't want install whole lodash package for just one of its function, so does lodash have typings for their single packages?


That package (lodash.assignin) is not available, please check list of available lodash packages here

For example if I want to use the first method I need to install npm i --save lodash.first Then I use the method like this const first = require('lodash.first');