declare-react-module
TypeScript icon, indicating that this package has built-in type declarations

1.13.0 • Public • Published

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

Package Sidebar

Install

npm i declare-react-module

Weekly Downloads

43

Version

1.13.0

License

MIT

Unpacked Size

41.7 kB

Total Files

36

Last publish

Collaborators

  • unstubbable