Hacker News new | past | comments | ask | show | jobs | submit login

So how does this work in practice? Does it strip types and yolo trying to run or will it spit out type errors?



If you read the third sentence of the PR, it says:

> During the transpilation process, no type checking is performed, and types are discarded


Why would you describe that "yolo"? If you're writing TS, you already have a TS linter that checks whether code has typing problems or not (at least, I certainly hope you do?). It's not really Node's job to do that linting, its job is to execute the JS that's hiding in the TS. It'd be "handy" if it did, but it'd also be a bit weird when there are already TS linting tools. It'd just hold up landing any sort of TS support that much longer.


If I understood correctly they use a wrapper around swc to strip types, without any type-check being performed.

Which makes perfect sense to start out with; as typechecking with tsc is rather slow and can easily be delegated to the consumer.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: