Consuming
From there you’ll be able to use lodash in your TypeScript code with no fuss. This works for both modules and global code.
For example, once you’ve npm install
-ed your type declarations, you can use imports and write
1 2 | import * as _ from "lodash" ; _.padStart( "Hello TypeScript!" , 20, " " ); |
or if you’re not using modules, you can just use the global variable _
.
1 | _.padStart( "Hello TypeScript!" , 20, " " ); |
Please login to continue.