Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jiangmy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
jiangmy
4y ago
Did you mean something like an error stack? That'll be significantly helpful if the last error is not apparent enough to solve the error. I'll investigate this and see if there's any performance impact on the inferring proces
2.
▲
by
jiangmy
4y ago
Thanks for the bug reporting. I have deployed a new version on the server to get this fixed!
3.
▲
by
jiangmy
4y ago
Thank you all for sharing constructive thoughts and concerns. I have written more FAQs on the website to make it more clear that what you can do with ESInfer. Plus, a `Comparison to Typescript` thread on the discussions repo on Github. htt
4.
▲
by
jiangmy
4y ago
foo() + 1 ESInfer complains about this because you are adding a string with a number, which sometimes will result in an unexpected value in runtime, and you hardly find it out. So ESInfer, on purpose, disallows this kind of type cas
5.
▲
by
jiangmy
4y ago
Good One! There are two issues here: 1. Tuple or Array? The inferred type will be different depending on that decision. Currently, I go for the Array one, so if you remove the `a[0].length` line, you will see `a` be inferred as `[string|num
6.
▲
by
jiangmy
4y ago
Thank you for clarifying and providing the use case. It makes total sense to me! I'm adding this to my to-do list. There can be many potential use cases, such as providing typing information to the IDE's LSP, ejecting them directl
7.
▲
by
jiangmy
4y ago
Hype up, Dude! Very glad to see so many afford to make javascript a better language there! I played it around, and I found Hegel seems not to support dynamic features like modifications of objects or prototypes. And this is the real difficu
8.
▲
by
jiangmy
4y ago
Thank you for sharing that great work! It's more like a dependent-type plug-in to typescript to me, if I understand it correctly. ESInfer and Ezno work on different layers, in my opinion. ESInfer provides a general ability to type-chec
9.
▲
by
jiangmy
4y ago
Yes, I did not do the paperwork well enough. I'm writing more articles and adding more examples on the website in the following days. As a brief reply here, it provides the ability to do statical type inference for javascript without w
10.
▲
by
jiangmy
4y ago
The difficulty comes from how dynamic language features you support & how accurate the type is inferred. Both in typescript and flow, you need to write annotations/comments to help the compiler perform well. ESInfer is doing it all
11.
▲
by
jiangmy
4y ago
Thanks for your reply, and sorry for the confusion! 1. I replaced the GitHub link with a direct link now. Because it is still in the very early stage, the repo is only open for discussions like feature requests, using feedback, etc. 2. The
12.
▲
Show HN: ESInfer – Make JavaScript Type-Safe
(esinfer.com)
83 points
by
jiangmy
4y ago
|
40 comments