1.13.0 • Published 6 years ago

declare-react-module v1.13.0

Weekly downloads
28
License
MIT
Repository
github
Last release
6 years ago

declare-react-module

npm build codecov semantic-release

Create TypeScript declaration files for React modules written in ES.Next (stage 2).

Usage

Locally

  1. Install declare-react-module as a dev dependency:

    npm install --save-dev declare-react-module
  2. Add a new entry to "scripts" in your package.json:

    {
      "prepublish": "declare-react-module"
    }

This will create an index.d.ts file in your project root before publishing to npm.

As a Global Script

  1. Install declare-react-module as a global dependency:

    npm install --global declare-react-module
  2. Run declare-react-module from the command line:

    declare-react-module packages/my-package
    # or
    declare-react-module node_modules/some-module --outDir=./typings