declare-react-module
v1.13.0
Published
Create TypeScript declaration files for React modules written in ES.Next.
Downloads
57
Maintainers
Readme
declare-react-module
Create TypeScript declaration files for React modules written in ES.Next (stage 2).
Usage
Locally
Install
declare-react-module
as a dev dependency:npm install --save-dev declare-react-module
Add a new entry to
"scripts"
in yourpackage.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
Install
declare-react-module
as a global dependency:npm install --global declare-react-module
Run
declare-react-module
from the command line:declare-react-module packages/my-package # or declare-react-module node_modules/some-module --outDir=./typings