Closed Drincann closed 1 year ago
- rename
tsconfig.default.json
: vscode recognizestsconfig.json
but nottsconfig.default.json
.
I'm a bit confused about this. For me, the reason to use tsconfig.default.json instead of tsconfig.json is that after the execution of the vsce package command, I hope there will be a .json file containing ts configuration in the package file, which will be used by the tsc command.
I'm sorry I didn't explain this clearly. I mean, when the name of the ts configuration file is not "tsconfig.json"
, vscode cannot recognize it as the ts configuration of the current answer file.
For the question simple-vue , after using just the content of the ts configuration I just modified in this pr, the correct answer can pass the compiler's check using tsc
cli, but the error will still be displayed in the vscode editor, like this
in the cases context is still inferred as any, because the correct configuration we maintained cannot be recognized by vscode because of the naming.
The user sees that there is an error in the vscode, But still passed the type check, or the situation can be reversed. This is a bit wired.
@Drincann I see, thank you very much for the pr, I'll merge later today and fix this.
tsconfig.default.json
: vscode recognizestsconfig.json
but nottsconfig.default.json
.alert
api located in the DOM.noImplicitThis
opt in tsconfig: the answer of 00006-hard-simple-vue uses ThisType which the noImplicitThis flag must be enabled to use.