Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code not doing type checking on typescript files

I'm trying to convert an existing codebase from flowtype to typescript, but VS Code will not report type errors in .ts files as expected.

enter image description here

Running tsc works as expected:

enter image description here

  • I installed typescript and tslint as npm devDependencies.
  • I added a <root>/tsconfig.json file.
  • I added a test file in <root>/frontend/ts-example.ts with types that should fail very badly.
  • Tried adding "typescript.validate.enable": true to my settings.json but it complained that was an unsupported setting.

What could I be missing here?

like image 736
Alex Wayne Avatar asked Oct 28 '25 14:10

Alex Wayne


1 Answers

Welp, uh...

I had the "TypeScript and JavaScript Language Features" extension disabled in my workspace.

Yep, that'll do it...

In case anyone in the future is as stupid as I am, check: VS Code Extensions > Disabled.

like image 144
Alex Wayne Avatar answered Oct 31 '25 03:10

Alex Wayne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!