Hacker News new | ask | show | jobs
by davnicwil 2204 days ago
No - you don't have to write the code in Typescript to get types - you can manually write type definitions for Javascript code.

In this case it would be even easier since it's already in Typescript and would presumably be a straight port, so all of those type definitions can be automatically generated from the existing code and will just work.

1 comments

I was going by this quote:

> ry So - to make a long story short - we're removing the types from internal code and making it pure JS this reduces complexity and helps us ship a faster product. I acknowledge it's unfortunate to lose the type information, but it's really masking larger problems. It's not going to happen immediately tho. We have a bit more work to figure out how exactly it should be done. It's not going to be one big 9000 line file either. But it might not be ES modules. depending on if we can make that work or not.

The “lose the type information” there suggested to me that they’re not planning to ship them at all.

I think that's in reference to losing the type information for their own development of that code. I'm almost certain they don't mean they will stop shipping type definitions for the public APIs.