Auto install(uninstall) typings for your package dependencies
npm install install-typesAuto install (uninstall) typings for your package dependencies.
- :package: Works with npm, yarn, pnpm
- :sunny: Updated regularly
- :palm_tree: In sync with DefinitelyTyped
- :fishing_pole_and_fish: Can be hooked with npm and husky hooks
npm i install-types
npm install -D install-types
or globally
npm install -g install-types
install-types syncer can be directly used as a module, returning with an object for types to install and uninstall
``js
import typesyncer from "install-types";
const types = typesyncer();
/**
* {
* install: {}, type dependencies to install
* uninstall: {} type dependencies to uninstall
* }
*/
`
#### Options
| options | description | type |
| --------- | -------------------- | ----- |
| exclude | exclude dependencies | Array |
You can use it directly in the cli if installed globally or can be used as a postinstall or prebuild script on your package.json.
`js`
"scripts": {
"postinstall": "install-types",
}
#### CLI Options
| options | description |
| ---------------- | ----------------------------- |
| --yarn | use yarn as package manager |--pnpm
| | use pnpm as package manager |--removeUnused
| | remove unused types |--exclude
| | exclude dependencies |
> install-types` uses types-directory internally sync with the types.