Open jart opened 8 years ago
We're not really supporting ES6_TYPED nowadays except for parsing .d.ts
files. I assume the error goes away if you go to ES6_STRICT
mode instead?
Yes I talked to the guy (forget his name) who was working on ES6_TYPED and he told me the same thing. I stopped documenting it in Closure Rules, but I still had some leftover typed unit tests (now deleted) which caused me to run into this bug. I wasn't sure if it was worth reporting this, since it makes no difference to me whether or not it's fixed. But I figured I'd do the right thing. Feel free to disregard and keep the issue for posterity. (Although I will say it's a shame that Google chose not to devote the resources to making Closure Compiler compete more directly with TypeScript. :cry:)
@jart I doubt this is an ES6_TYPED
specific issue since the example is not using any TypeScript syntax. Does the errors really go away with ES6_STRICT
?
Closure Compiler is designed for people who are writing JavaScript, not for people writing something similar to JavaScript, such as Dart/CoffeScript/TypeScript/etc. There's a lot of discussion going on about the future of JS and TypeScript-style type annotations are of course part of that. But this is more a topic for the discussion list than for the issue tracker.
Reopening as this doesn't really use any TypeScript syntax. It's bad if people get wrong errors just by using a different language mode. Besides, since we don't have a separate language mode for externs, I can imagine a workflow that just passes in ES6_TYPED
and I don't want to break that.
Also @MatrixFrog I forgot to mention: Yes, I confirmed the error only happens when --language_in=ECMASCRIPT6_TYPED
.
@Dominator008 Out of respect for @MatrixFrog, I'm going to re-close this issue and encourage you to start a thread on closure-compiler-discuss. If you start a thread there, I have a few things on my mind I'll happily contribute to the discussion.
I don't really care much if it's open or closed, as long as it's clear that we're unlikely to fix it in the forseeable future.
@jart Just an FYI - Dominator008 is a closure-compiler core contributor with commit access.
Oh wow. I had no idea.
/me blushes and reopens issue.
Yeah - we no longer get badges on our comments. You just have to "know".
I'm using
v20160315
and I'm noticing the following error when I compile Closure Library code inADVANCED
ECMASCRIPT6_TYPED
mode:The params I'm using are:
The code in question is: