We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: nervjs 1.5.7 现象:使用 TS 时,nervjs 类型无法正常提示 原因:
package.json 中指定的 typings 路径为 index.d.ts:
index.d.ts
{ "name": "nervjs", "version": "1.5.7", "description": "A react-like framework based on virtual-dom", "main": "index.js", "module": "dist/index.esm.js", "jsnext:main": "dist/index.esm.js", "typings": "index.d.ts", "unpkg": "dist/nerv.js", }
npm包中实际的typing路径为 dist/index.d.ts
typing
dist/index.d.ts
├── CHANGELOG.md ├── README.md ├── dist │ ├── index.d.ts # d.ts │ ├── index.esm.js │ ├── index.esm.js.map │ ├── index.js │ ├── index.js.map │ ├── index.prod.js │ ├── nerv.js │ ├── nerv.js.map │ ├── nerv.min.js │ └── packages ├── index.js └── package.json
The text was updated successfully, but these errors were encountered:
+1,刚刚也发现了。
不过可以在项目根目录下建个.d.ts文件,里面使用reference来解决
/// <reference path="node_modules/nervjs/dist/index.d.ts" />
话说,nervjs是没人维护了吗?
Sorry, something went wrong.
No branches or pull requests
Version: nervjs 1.5.7
现象:使用 TS 时,nervjs 类型无法正常提示
原因:
package.json 中指定的 typings 路径为
index.d.ts
:npm包中实际的
typing
路径为dist/index.d.ts
The text was updated successfully, but these errors were encountered: