TypeScript/tests/baselines/reference/parserModule1.js
Wesley Wigham c6c2c4c8d5
Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar (#37093)
* Hoist initial assignment to exported names in cjs to they are not blocked by bindings made by __exportStar

* Copy hoisted identifiers so they do not create sourcemaps

* Accept updated baselines
2020-02-28 13:25:28 -08:00

64 lines
1.7 KiB
TypeScript

//// [parserModule1.ts]
export module CompilerDiagnostics {
export var debug = false;
export interface IDiagnosticWriter {
Alert(output: string): void;
}
export var diagnosticWriter: IDiagnosticWriter = null;
export var analysisPass: number = 0;
export function Alert(output: string) {
if (diagnosticWriter) {
diagnosticWriter.Alert(output);
}
}
export function debugPrint(s: string) {
if (debug) {
Alert(s);
}
}
export function assert(condition: boolean, s: string) {
if (debug) {
if (!condition) {
Alert(s);
}
}
}
}
//// [parserModule1.js]
"use strict";
exports.__esModule = true;
exports.CompilerDiagnostics = void 0;
var CompilerDiagnostics;
(function (CompilerDiagnostics) {
CompilerDiagnostics.debug = false;
CompilerDiagnostics.diagnosticWriter = null;
CompilerDiagnostics.analysisPass = 0;
function Alert(output) {
if (CompilerDiagnostics.diagnosticWriter) {
CompilerDiagnostics.diagnosticWriter.Alert(output);
}
}
CompilerDiagnostics.Alert = Alert;
function debugPrint(s) {
if (CompilerDiagnostics.debug) {
Alert(s);
}
}
CompilerDiagnostics.debugPrint = debugPrint;
function assert(condition, s) {
if (CompilerDiagnostics.debug) {
if (!condition) {
Alert(s);
}
}
}
CompilerDiagnostics.assert = assert;
})(CompilerDiagnostics = exports.CompilerDiagnostics || (exports.CompilerDiagnostics = {}));