Hacker News new | ask | show | jobs
by ovao 1535 days ago
> /// <reference no-default-lib="true"/>: Deno comes with various TypeScript libraries enabled by default; with this comment, we tell it to not use those, but instead only the ones we specify manually.

Interesting. I checked the docs on this and it’s not quite clear to me why this is needed in this case, or what the benefit is in taking this approach. Is this strictly a build time optimization, or is it necessary in this example?

1 comments

It’s actually not needed at all for runtime. It’s purely for editor experience and type checking.