angular / ts-minify

A tool to aid minification of Typescript code, using Typescript's type information.
Apache License 2.0
121 stars 7 forks source link

Property Name Generation bug #27

Closed dariajung closed 9 years ago

dariajung commented 9 years ago

Running the minifier through ts2dart produces this interesting renaming dictionary...

screen shot 2015-08-13 at 2 00 18 pm

lastGeneratedPropName isn't being updated in one of the if clauses

dariajung commented 9 years ago

Proposed solution, line 270 in ts-minify main.ts

} else if (chars[0].match(/[0-9]/)) {
      newName = firstAlpha + Array(len).join(firstChar);
      this.lastGeneratedPropName = newName;
      return newName;