gpt4 book ai didi

typescript - 尝试对新的明确类型定义运行 lint 时出错

转载 作者:搜寻专家 更新时间:2023-10-30 21:56:52 28 4
gpt4 key购买 nike

我正在尝试为 Definitely Typed 贡献一些新的类型定义,所以我遵循这里的指南:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/.github/PULL_REQUEST_TEMPLATE.md

但是 linter 在我脸上爆炸了。

我试着用这个命令创建一个全新的测试包:

npx dts-gen --dt --name test --template module

然后我在上面运行了 linter:

npm run lint test

当我这样做时,我得到了错误:

Error: Expected `"strictFunctionTypes": true` or `"strictFunctionTypes": false`.
at Object.<anonymous> (/usr/local/lib/node_modules/dtslint/bin/checks.js:95:23)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/dtslint/bin/checks.js:4:58)

最佳答案

尝试与 test 不同的名称,npx dts-gen --dt --name xxxx --template module 似乎没问题 :)

关于typescript - 尝试对新的明确类型定义运行 lint 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53658100/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com