Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, that's true of TypeScript in general. Code that fails type checking still gets emitted as JS.

It's a bit annoying, but there's good reason for it. However, it can be controlled with compilerOptions.noEmitOnError (can be passed as a flag too).

https://www.typescriptlang.org/tsconfig/#noEmitOnError

That being said, if using something like SWC or wrappers that's less useful, since they don't type check.

TypeScript is great, but setting up projects that use it often come with some tradeoff (but I still think TS is worth it)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: