News for hackers. Stuff that matters.
Re:Hegel – An advanced static type checker for JavaScript by hermanradtke on Thursday October 13, 2022 @07:23AM (#33189591)
There multiple libraries like this and gajus is well aware of them. They are libraries instead of being part of the language.
Re:Hegel – An advanced static type checker for JavaScript by kotlin2 on Thursday October 13, 2022 @08:13AM (#33189917)
Yes, runtypes is not the only option. But the point is that TypeScript’s type system is powerful enough to implement runtime type checking. I’m not sure what the benefit would be to adding the concept as a first-class citizen in the language.