logoalt Hacker News

jitllast Sunday at 10:28 PM1 replyview on HN

It’s great in TypeScript. In TypeScript your source can have inferred types returned, and then use a build step to produce resolved typings files (.d.ts) for distribution that have the fully specified type.


Replies

thrancelast Sunday at 11:36 PM

Ah, true, now that you mention it. I feel like it's the best of both worlds, you get type inference and it gets documented automatically.