Does npm
or yarn
have feature to automatically install @types/*
for packages without own types, if they exist in Typescript projects?
Something like:
//package.json
{
// ...
installTypes: true
}
// installing package
yarn add ABC <- will install ABC + @types/ABC
There's a yarn v2+ plugin for this at https://www.npmjs.com/package/@yarnpkg/plugin-typescript
Since yarn v4, its included by default.
Instructions for installation, when using yarn v2 or v3 is:
yarn plugin import typescript
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With