添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
朝气蓬勃的柿子  ·  luban-react-cli CDN ...·  1 月前    · 
豁达的帽子  ·  Externals - Rspack·  1 月前    · 
还单身的弓箭  ·  TypeError: Cannot ...·  1 月前    · 
喝醉的哑铃  ·  New Override feature ...·  1 月前    · 
细心的机器猫  ·  How to Fix npm Peer ...·  1 月前    · 
无邪的蚂蚁  ·  少女前線:WA2000 - ...·  1 年前    · 
踏实的匕首  ·  AnkiX高考- 知乎·  2 年前    · 
刚毅的苦瓜  ·  传热学基础- 知乎·  2 年前    · 

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 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

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