Reputation: 2480
My environment:
I am writing this simple erroneous of code in a file called server.ts
:
let isDone: boolean = "done"
After running tsc
I am getting the compiler error i expect to see:
src/server.ts:1:5 - error TS2322: Type '1' is not assignable to type 'boolean'.
However, looking at the problems pane of Vscode does not warn me of this error. there are no problems reported and no error are being highlighed on the editor.
Is type checking supported in anyway in Vscode?
Upvotes: 0
Views: 1963
Reputation: 30999
The resolution was to turn on the typescript.validate.enable
setting in VS Code, which is on by default but had somehow been turned off.
Upvotes: 3