clutz
clutz copied to clipboard
gents doesn't handle variable name collisions after renaming exports.
goog.provide('foo.namespace.Foo');
goog.provide('foo.namespace.Foo.values');
/**
* @constructor
*/
foo.namespace.Foo = function() {
let values = foo.namespace.Foo.values;
this.value = values.a;
}
/**
* @const
*/
foo.namespace.Foo.values = {
a:1,
b:2,
c:3
}
gets turned into:
export class Foo {
value: any;
constructor() {
let values = values;
this.value = values.a;
}
}
export const values = {
a: 1,
b: 2,
c: 3
};
notice the let values = values in the resulting TypeScript.