Hacker News new | ask | show | jobs
by huydotnet 1526 days ago
Hey, I'm the author of the article. Thank you so much for the feedback!

Yeah, look like I get the relation between Emitter and Type Checker in the reversed way [1] :D The type checker should provide an EmitResolver. I'll update the post and the diagram!

[1]: https://basarat.gitbook.io/typescript/overview/checker#assoc...

1 comments

The article is great, sorry for the quibble!

The maybe too subtle point I was trying to make is that, even though the TypeChecker object literally provides an EmitResolver (I think? something like that?), in terms of the conceptual layout of the compiler, if you have a box labelled "Type Checker" it's natural for the reader to think it's where type checking happens.

In other words, the graph is something like

    TypeChecker object -> EmitResolver -> js files
      |
      v
     type checking