-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
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
vscode & TypeScript & noImplicitReturns #66
Comments
tsconfig.jsonnot work ❌{
"compilerOptions": {
// "target": "ES2022",
// "target": "ES2020",
"target": "ESNext",
"module": "ESNext",
"lib": [
"ES2015",
"ES2016",
"ES2017",
"ES2018",
"ES2019",
"ES2020",
// "ES2021",
// "ES2022",
"ESNext",
"dom",
"dom.iterable"
],
"downlevelIteration": false,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
"sourceRoot": "./src",
"allowJs": true,
// Generate d.ts files ✅
"declaration": true,
"checkJs": false,
"noImplicitAny": false,
"baseUrl": "./src",
"locale": "zh-CN",
"noImplicitReturns": true,
"incremental": false
},
"type": "module",
"include": [
// "src/**/*",
"test/**/*"
],
"exclude": [
"node_modules",
"build",
"js-solutions/**/*",
"data-structures/**/*",
"000-xyz/**/*",
"test/**/*.spec.ts"
]
}
work well ✅{
"compilerOptions": {
// "target": "ES2022",
// "target": "ES2020",
"target": "ESNext",
"module": "ESNext",
"lib": [
"ES2015",
"ES2016",
"ES2017",
"ES2018",
"ES2019",
"ES2020",
// "ES2021",
// "ES2022",
"ESNext",
"dom",
"dom.iterable"
],
"downlevelIteration": false,
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
"sourceRoot": "./src",
"allowJs": true,
// Generate d.ts files ✅
"declaration": true,
"checkJs": false,
"noImplicitAny": false,
"baseUrl": "./src",
"locale": "zh-CN",
"noImplicitReturns": true,
"incremental": false
},
"type": "module",
"include": [
// include folder ✅ 🚀
"src/**/*",
"test/**/*"
],
"exclude": [
"node_modules",
"build",
"js-solutions/**/*",
"data-structures/**/*",
"000-xyz/**/*",
"test/**/*.spec.ts"
]
}
|
TypeScript & LeetCode & NodeNext
{
"compilerOptions": {
"target": "ESNext", // 指定 ECMAScript 目标版本
"module": "NodeNext", // 指定模块标准
"lib": ["ESNext"], // 指定要包含在编译中的库文件
"strict": true, // 启用所有严格的类型检查选项
"strictNullChecks": false, // 启用严格的空(undefined、null)检查”
"noImplicitReturns": true, // 不是函数中的所有代码路径都返回值时报告错误
"noFallthroughCasesInSwitch": true, // 在 switch 语句中报告失败情况的错误
"forceConsistentCasingInFileNames": true // 禁止对同一文件的大小写不一致的引用
},
"exclude": ["node_modules"]
}
https://juejin.cn/post/7195086942784995383 # Node.js
$ npm i -D @types/node
screenToGif ❌ 不支持 macOSScreen, webcam and sketchboard recorder with an integrated editor |
macOS 录屏 gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vscode & TypeScript & noImplicitReturns
microsoft/vscode#173524
tsconfig.json
✅.vscode/settings.json
不好使,
[typescript]
不支持noImplicitReturns
配置 ❌The text was updated successfully, but these errors were encountered: