Ben Lickly

Results 29 comments of Ben Lickly

I'd be interested to see how many advanced-incompatible libraries could be made advanced-mode compatible by doing something like this, and then be compiled in with the rest of a binary...

Thanks for the report. We just added the dependency on jspecify in https://github.com/google/closure-compiler/commit/33bf62ad769c4915c734bcf31387e4fbf972ea8a on July 27, so that seems a likely candidate for when this started. Since we are one...

> The `java_binary` target definitely has it. @cpovirk, by this do you mean that `java_binary` already includes a dependency on `org.jspecify` and our extra dependency is unnecessary, or that using...

Thanks for looking into this. I'll also follow along on on https://github.com/bazelbuild/bazel/issues/11930 Since we tend to use bazel and the Google-internal variant interchangeably, any improvements to make them behave the...

Looking over that PR, it seems like Bradford's suggestion of aliasing the native EventTarget is a workaround: e.g. https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520ADVANCED_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%2540language_out%2520ES6%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250A%252F**%2520%2540constructor%250A%2520%2520%2520%2520%2540implements%2520%257BEventTarget%257D%2520*%252F%250Avar%2520NativeEventTarget%2520%253D%2520self%255B%2522EventTarget%2522%255D%253B%250A%250Aclass%2520Foo%2520extends%2520NativeEventTarget%250A%257B%250A%257D%250A%250Aalert(new%2520Foo) I agree it's not as satisfying as updating the default externs,...

Ah, good point. I wasn't looking at the warnings. It's possible to run the compiler with your own externs, but that's a lot poorer UX than just getting the default...

I think that goog.define() will work inside ES6 modules, which is generally preferred over naked @defines anyway since it can also work in uncompiled code.

Thanks for the report, this does look like a very useful ES2021 feature. (Full list is at https://github.com/tc39/proposals/blob/master/finished-proposals.md)

Created internal Google issue http://b/145533139