Created
February 9, 2015 10:02
-
-
Save cevek/8fba2e0a0d899e49920b to your computer and use it in GitHub Desktop.
emitConstructorOfClass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function emitConstructorOfClass() { | |
var saveTempCount = tempCount; | |
var saveTempVariables = tempVariables; | |
var saveTempParameters = tempParameters; | |
tempCount = 0; | |
tempVariables = undefined; | |
tempParameters = undefined; | |
ts.forEach(node.members, function (member) { | |
if (member.kind === 129 /* Constructor */ && !member.body) { | |
emitPinnedOrTripleSlashComments(member); | |
} | |
}); | |
var ctor = getFirstConstructorWithBody(node); | |
if (ctor) { | |
emitLeadingComments(ctor); | |
} | |
emitStart(ctor || node); | |
write("function "); | |
emit(node.name); | |
emitSignatureParameters(ctor); | |
write(" {"); | |
scopeEmitStart(node, "constructor"); | |
increaseIndent(); | |
write('this.changes__ = {};'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment