Technically, you can pull ES6 out tscand immediately pass it to the Closure Compiler, since the latter should accept JS as input. We already do this in many places, for example. Angular applications compiled with a closure compiler take the rxjs library distribution kit and include it in the closure kit. See https://github.com/angular/closure-demo
In practice, we find several reasons to use something like tsickle to transform JS before Closure sees it.
- enums emit does not work in Closure (or rollup IIUC)
- Closure has some limitations with ES6, for example, it does not currently support it
export *- tsickle rewrites that onexport {each, visible, symbol} - JSDoc , , .
, tsickle TS 2.3 emit transforms, , .
. , {?} . , - TypeScript JS, , .
, - tcickle toolchain Bazel https://github.com/bazelbuild/rules_typescript. Tsickle main . ( , Lucidchart ?)