types-sync
TypeScript icon, indicating that this package has built-in type declarations

3.69.0 • Public • Published

types-sync

Keep your types in sync with DefinitelyTyped - auto install/uninstall types for dependencies on postinstall.

npm version

Features

  • Works with npm, yarn, pnpm, bolt
  • In sync with DefinitelyTyped
  • Can be hooked with npm and husky hooks

Install

npm install -D types-sync

Usage

As CLI

Use types-sync as postinstall scripts in your package.json

"scripts": {
  "postinstall": "types-sync",
}

As Module

import typesSync from 'types-sync';

const types = typesSync({
  dependencies,
  devDependencies,
  ignore,
});

Config

Add a .types-syncrc.json at the root of your project.

options type description
dependencies Array dependencies to manually add for sync
ignore Array ignore these dependencies from removing
packageManager npm/yarn/pnpm/bolt package manager to use
removeUnused Boolean remove unsued types

Note: types-sync will automatically detect the package manager being used according to the lock files. Explicitly defining the packageManager config option is optional and if defined will force types-sync to use the specified package manager.

Refer to ./types-syncrc.json for full config

Related

Readme

Keywords

none

Package Sidebar

Install

npm i types-sync

Weekly Downloads

7

Version

3.69.0

License

MIT

Unpacked Size

205 kB

Total Files

13

Last publish

Collaborators

  • maddhruv