TypeScript/tests/baselines/reference/moduleMemberWithoutTypeAnnotation2.js

34 lines
1,001 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [moduleMemberWithoutTypeAnnotation2.ts]
module TypeScript {
export module CompilerDiagnostics {
export interface IDiagnosticWriter {
Alert(output: string): void;
}
export var diagnosticWriter = null;
export function Alert(output: string) {
if (diagnosticWriter) {
diagnosticWriter.Alert(output);
}
}
}
}
//// [moduleMemberWithoutTypeAnnotation2.js]
var TypeScript;
(function (TypeScript) {
var CompilerDiagnostics;
2014-07-13 01:04:16 +02:00
(function (CompilerDiagnostics) {
CompilerDiagnostics.diagnosticWriter = null;
function Alert(output) {
if (CompilerDiagnostics.diagnosticWriter) {
CompilerDiagnostics.diagnosticWriter.Alert(output);
}
}
CompilerDiagnostics.Alert = Alert;
})(CompilerDiagnostics = TypeScript.CompilerDiagnostics || (TypeScript.CompilerDiagnostics = {}));
2014-07-13 01:04:16 +02:00
})(TypeScript || (TypeScript = {}));