I would expect the following code (inside an arbitrary Class) to show a TypeScript error in VSCode. But it doesn't. Why?
protected someMethod (someArg?: boolean) {
this.doSomething(someArg)
}
protected doSomething (mustBePassedBoolean: boolean) {
/* ... */
}
The tooltip doesn't even acknowledge that someArg
should be boolean|undefined
:
I'm guessing this must be an eslint configuration error because the same thing in TypeScript playground acts as I would expect. But I'm not seeing any eslint configuration errors in the VSCode console.
Any advice on troubleshooting VS Code eslint problems like this?
Edit
It's worth noting that I am seeing some expected TypeScript errors, in the same file. As far as I can tell this seems to only happen with vars I would expect to be cast as |undefined
.
Comments
Post a Comment