version-rocket
version-rocket copied to clipboard
tsc报错error TS7029: Fallthrough case in switch.
https://github.com/guMcrey/version-rocket/blob/2111135aea012220c14e028c24cd0b02873ab6fe/utils/index.ts#L147-L49
switch (cancelModeType) {
case 'ignore-current-version':
if (newVersion && cancelModeTypeValue === newVersion) {
isStopWorker && worker?.terminate()
return true
}
+ break
case 'ignore-today':
if (cancelModeTypeValue === todayDate) {
isStopWorker && worker?.terminate()
return true
}
break
case 'ignore-current-window':
if (cancelModeTypeValueInSession) {
isStopWorker && worker?.terminate()
return true
}
break
default:
break
}
在case 'ignore-current-version':里缺少一个break
收到, 谢谢你的反馈, 我会尽快修复的♥️
@caocong1 你好呀, 想问下 "tsc报错error TS7029: Fallthrough case in switch" 这个报错是在什么情况下触发的呢?
@caocong1 你好呀, 想问下 "tsc报错error TS7029: Fallthrough case in switch" 这个报错是在什么情况下触发的呢?
tsconfig.json里配置noFallthroughCasesInSwitch这个就会提示这个错误。
{
"compilerOptions": {
...
"strict": true,
"noFallthroughCasesInSwitch": true
},
...
}
收到, 修复啦