xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

TypeScript type check ignore node_modules folder All In One

TypeScript type check ignore node_modules folder All In One

error

node_modules/@types/webpack/index.d.ts:1485:24 - error TS2707: Generic type 'SyncBailHook<T, R, AdditionalOptions>' requires between 2 and 3 type arguments.
1485 _pluginCompat: SyncBailHook<compilation.Compilation>;

image

solution

skipLibCheck

{
  "compilerOptions": {
    "module": "CommonJS",
    // "module": "commonjs",
    // "module": "umd",
    // "module": "amd",
    // "module": "es6",
    // "target": "es6",
    "target": "es5",
    // "target": "es3",
    "sourceMap": true,
    "sourceRoot": "./src",
    "baseUrl": "./src",
    "outDir": "./dist/",
    "locale": "zh-CN",
    "noImplicitAny": true,
    "allowJs": true,
    "declaration": true,
    "declarationDir": "./types",
    "declarationMap": true,
    "skipLibCheck": true
  },
  "type": "module",
  "include": [
    // include folder ✅
    "src/**/*",
  ],
  "exclude": [
    "node_modules",
    "types",
    "build",
    "dist",
    "build",
    "000-xyz/**/*",
    "test/**/*.spec.ts"
  ]
}


image

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

https://www.cnblogs.com/xgqfrms/p/17205522.html



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-03-12 20:32  xgqfrms  阅读(140)  评论(0编辑  收藏  举报