DEV Community

Discussion on: Pitch me on TypeScript

Collapse
peerreynders profile image
peerreynders

One thing I think needs to be called out more:

Just because you're "writing TypeScript" doesn't mean your code is actually being "type linted". You have to understand what your build process is doing.

For example, Vite:

"Vite only performs transpilation on .ts files and does NOT perform type checking.
...
Vite uses esbuild to transpile TypeScript into JavaScript which is about 20~30x faster than vanilla tsc ..."

Increasingly to keep things snappy a lot of default workflows are transpilation-only, so unless there is a deliberate "type check step" somewhere, type errors and warnings may only be caught casually in the editor/IDE, if at all.