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

Anyone know what the "zapped" they mention as a form of typechecking is? I'd like to learn more about that and the tools that do that



It's being renamed to a no-slow-types lint rule that occurs on publish and in deno lint. Essentially it enforces that the types of the public API can be determined without inference. This enables a few things:

1. Type checking ts sources is really fast when Deno determines a package does not use slow types. It may entirely drop packages and modules that aren't relevant for type checking. It also skips parsing and building symbols for the internals of a package (ex. function bodies).

2. Documentation is really fast to generate (doesn't need a type checker).

3. A corresponding .d.ts file for relevant typescript code is automatically created for Node.


https://github.com/denoland/deno_graph/blob/main/src/fast_ch...

You can search for "no_zap" under the `denoland` org if you want to have a bit more context.

I believe it's a form of type checking where, simplifying, things like function bodies are removed and type checking is only done across top-level items.




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

Search: