You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript helpers (__extends, __decorate, __param, etc.) currently all have leading underscores in their names in the generated code. Unfortunately the Closure compiler treats names with a preceding underscore as special names that shouldn't be dead-code eliminated or renamed.
It would be nice if these builtins had some other name, e.g. TypeScript__extends or some such. It's not really TypeScript's problem but Closure is currently the best minifier so working together is nice.
This would be fixed by issue #3364 as well, but I thought I'd capture the Closure-specific issue separately because it's not the same problem.
@mhegazy yes, I believe we use that. But that one specification is redundant for helpers that are unused, and it'd be nice to be able to minify the function names (__extends => a) as well.
TypeScript helpers (__extends, __decorate, __param, etc.) currently all have leading underscores in their names in the generated code. Unfortunately the Closure compiler treats names with a preceding underscore as special names that shouldn't be dead-code eliminated or renamed.
It would be nice if these builtins had some other name, e.g.
TypeScript__extends
or some such. It's not really TypeScript's problem but Closure is currently the best minifier so working together is nice.This would be fixed by issue #3364 as well, but I thought I'd capture the Closure-specific issue separately because it's not the same problem.
Example code to make it clearer: this input code
in Closure produces
where baz was eliminated and bar was renamed and inlined, but _foo was kept due to the underscore.
The text was updated successfully, but these errors were encountered: