Installs @types for your dependencies
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts
src
.editorconfig
.gitignore
.npmignore
.travis.yml
README.md
jest.config.js
package.json
tsconfig.json
tslint.json
yarn.lock

README.md

NPM   Build Status

Types Installer

A CLI which updates and populates missing @types/* for your dependencies.

Install

  • Globally: yarn global add types-installer
    • Then run types-installer
  • Locally: yarn add types-installer
    • Then run yarn types-installer

CLI

Interactive

% types-installer

  ? Install options: all
  ? Install @types/* to devDependencies? Yes
  Installing all @type dependencies...
  ? select jest (Installed), ts-jest , ts-node , tslint , tslint-eslint-rules , typescript , chalk , commander (Installed), execa , inquirer

  @types/tslint not found or failed to install
  @types/chalk found

  success Saved 1 new dependency.
  └─ @types/chalk@0.4.31

Non-Interactive

% types-installer install

  Installing all @type dependencies...

  @types/tslint not found or failed to install
  @types/chalk found

  success Saved 1 new dependency.
  └─ @types/chalk@0.4.31
% types-installer install chalk

  Installing dependency chalk @types
  @types/chalk found

  success Saved 1 new dependency.
  └─ @types/chalk@0.4.31

Help

types-installer --help for more options

Behavior

  • Types are by default saved to dependencies or devDependencies, wherever the dependency exists.
  • To force everything top be saved into devDependencies, add the --toDev flag.