Typescript compiles
class ClassName { }
to
var ClassName = function () {
function ClassName() {
}
return ClassName;
}();
I run that JS code through sweet.js, which even when there are no macros defined, produces something like this:
var ClassName$659 = function () {
function ClassName$663() {
}
return ClassName$663;
}();
I understand that sweet.js would not rename the first occurrence of ClassName
if the top-level var
wasn't used, or if a different name was used for the constructor function, but it's the Typescript compiler that does those things, not me.
ClassName
in HTML files. That's not something I want to do often, and I can of course always do without the capability, but I still miss having it. Is there a way to disable hygienic renaming in sweet.js? Is there a better way to deal with this issue?
Using the --readable-names flag with sjs, as @AnthonyCalandra suggested, resolved my problem.