demo/typescript.js
function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) {
                if (shouldEmitCommaBeforeAssignment) {
                    write(", ");
                }
                var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name);
                if (exportChanged) {
                    write(exportFunctionForFile + "(\"");
                    emitNodeWithCommentsAndWithoutSourcemap(name);
                    write("\", ");
                }
                var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 211 /* VariableDeclaration */ || name.parent.kind === 163 /* BindingElement */);
                if (isVariableDeclarationOrBindingElement) {
                    emitModuleMemberName(name.parent);
                }
                else {
                    emit(name);
                }
                write(" = ");
                emit(value);
                if (exportChanged) {
                    write(")");
                }
            }
function emitAssignment(name, value, shouldEmitCommaBeforeAssignment) {
                if (shouldEmitCommaBeforeAssignment) {
                    write(", ");
                }
                var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name);
                if (exportChanged) {
                    write(exportFunctionForFile + "(\"");
                    emitNodeWithCommentsAndWithoutSourcemap(name);
                    write("\", ");
                }
                var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 211 /* VariableDeclaration */ || name.parent.kind === 163 /* BindingElement */);
                if (isVariableDeclarationOrBindingElement) {
                    emitModuleMemberName(name.parent);
                }
                else {
                    emit(name);
                }
                write(" = ");
                emit(value);
                if (exportChanged) {
                    write(")");
                }
            }
Emit an assignment to a given identifier, 'name', with a given expression, 'value'.
@param name an identifier as a left-hand-side operand of the assignment
@param value an expression as a right-hand-side operand of the assignment
@param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma