中小型网站建设信息,免费店铺logo在线制作,html5的网站设计,好书推荐ppt模板免费下载在ts的项目里面#xff0c;真的经常看到any类型的报错#xff0c;真的很烦的
所以为了眼不见心不乱#xff0c;我决定消除这个错误提示
在tsconfig.json里面配置 noImplicitAny: false 就可以了
{compilerOptions: {target: E…在ts的项目里面真的经常看到any类型的报错真的很烦的
所以为了眼不见心不乱我决定消除这个错误提示
在tsconfig.json里面配置 noImplicitAny: false 就可以了
{compilerOptions: {target: ES2020,useDefineForClassFields: true,lib: [ES2020, DOM, DOM.Iterable],module: ESNext,skipLibCheck: true,noImplicitAny: false,/* Bundler mode */moduleResolution: Node,allowSyntheticDefaultImports: true,resolveJsonModule: true,isolatedModules: true,noEmit: true,jsx: react-jsx,/* Linting */strict: true,noUnusedLocals: true,noUnusedParameters: true,noFallthroughCasesInSwitch: true,baseUrl: ./,paths: {: [src],/*: [src/*]}},include: [src],references: [{ path: ./tsconfig.node.json }]
}保存tsconfig.json然后就可以了: