Yeah, the example works - I guess I have trust issues with plain JS without types. I've seen too much JS that "works", but not for the right reason, or not the way it appeared to work, if you know what I mean?
I think types would better explain the data structures and concepts here - rather than making the reader reverse engineer the code to try to infer what's what. What's running, what's in dependencies, and so on.
It's challenging even after watching the video and reading the article.
// A Dependency has many different Subscribers depending on it// A particular Subscriber has many Dependencies it depends ontypeDependency=Set<Subscriber>;typeSubscriber={execute():void;dependencies:Set<Dependency>;};
Yeah, the example works - I guess I have trust issues with plain JS without types. I've seen too much JS that "works", but not for the right reason, or not the way it appeared to work, if you know what I mean?
I think types would better explain the data structures and concepts here - rather than making the reader reverse engineer the code to try to infer what's what. What's
running
, what's independencies
, and so on.It's challenging even after watching the video and reading the article.
I still can't make sense of the types.
Sometimes clarity comes from the chosen names.
Change #1:
Change #2:
Change #3:
Change #4:
TypeScipt Playground
Yes! This is what the article/video/example was missing. Thank you! 😀🙏