Hello, folks. I'm Jiang, the author of ESInfer.
I love writing Javascript because it has a prosperous ecosystem and is quick to get my hands dirty. However, sometimes it's painful when the flow is not fast to follow due to the lack of a type system.
To solve this, I wrote ESInfer, a statical inference tool, to automatically type check and generate type annotations for Javascript.
It works with pure Javascript without any add-ons to the language or user-space code and supports highly dynamic features, such as the modification of prototypes.
It is still in the very early stage, which offers almost all ES5 features and a select set of ES6 features like array/object destructing. I'm working hard to bring all ES6+ features into it incrementally.
If you heavily use javascript/typescript and do NOT want to write the type annotation sh*ts anymore, give it a try :)
A big part of my confusion, I think, is that I’m not sure why you’d want to write code without type annotations. I can see a use for autogenerating them from code that doesn’t have any, but the first example on the page infers the return type of hello() as “t547061|string” which is rather more opaque than I’d prefer from a diagnostic. A big part of why I use TypeScript is because of the type annotations: both so future readers can understand my intent, and also to give the type checker hints about what I was thinking so it can point to exactly where I went wrong instead of going “this over here doesn’t work with that thing over there, I dunno, there’s probably something in the middle that’s not right.” So I’m curious what your thoughts are on why you dislike annotations and how to make type errors clear without leaning on them for support.