JSMonk / hegel

An advanced static type checker
https://hegel.js.org
MIT License
2.09k stars 59 forks source link

Plugin system to support new ES syntax? #134

Closed linonetwo closed 4 years ago

linonetwo commented 4 years ago

When using flow, lack of new syntax support is a pain. https://github.com/facebook/flow/labels/ES2015%2B

Will hegel support plugin system or reuse babel transforms? So it can support some new syntax from community plugin, instead of letting users waiting for core support for a long time?

JSMonk commented 4 years ago

Hi. Hegel uses Babel as a parser, but doesn't compile your code, but, Hegel needs to inference the result of an invocation of new operators, so we will try to provide analysis for any new syntax. Thank you for contribution ^_^

linonetwo commented 4 years ago

Glad to hear that! Flow lacks optional chaining for a really long time... It just ignores that useful syntax.

I will close this issue since this is just a question, not a real big issue.