Fork me on GitHub
#cljs-dev
<
2020-11-03
>
cfleming22:11:35

I’m playing around with the Google Closure JS parser, because I’m considering replacing the JS parser in Cursive with it. However doing some tests with it it seems like it doesn’t support ES6 decorators - does anyone know if that’s the case? I’d be surprised since AFAICT the idea is that it should be able to parse/handle anything, but I might be wrong about that.

thheller22:11:35

aren't decorators still just a proposal? don't think they ever actually made it into es6?

thheller22:11:37

otherwise the parser is updated fairly regularly with most features as long as they are on some standard level

cfleming22:11:38

I’m not sure, I must admit.

cfleming22:11:59

Ok, thanks.

thheller22:11:25

most recent thing they implement is the optional chaining stuff

thheller22:11:41

foo?.bar etc

cfleming22:11:08

Ah, ok. So presumably they’ll implement things like decorators if they become standard?

thheller22:11:21

I'd assume so yes

thheller22:11:32

typescript has them I believe but typescript support is limited in gcc

cfleming22:11:53

I think they have some support for parsing, and also converting TS types to Closure ones - presumably so they can use type definition files for third party libs.

lilactown23:11:40

Indeed, tsickle is quite cool

lilactown23:11:51

Not sure what the status of actual native support for TS is in GCC