Install missing TypeScript typings for dependencies in your package.json
.
npm install -g typesync
You can also use it directly with npx
which will install it for you:
npx typesync
typesync [path/to/package.json] [--dry]
Path is relative to the current working directory. If omitted, defaults to package.json
.
Note: typesync
only modifies your package.json
- you still need to run npm install
, or — if drinking the k00laid — yarn
.
If --dry
is specified, will not actually write to the file, it only prints added/removed typings.
The same is true for --dry=fail
, with the additional effect of failing the command in case there are changes.
This is useful for CI scenarios.