From a90ff10d8a3f8f080deccd8d4feeffe75b5a54aa Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 16 Jan 2019 14:37:09 -0800 Subject: [PATCH] Tests for multiple prologues --- src/testRunner/unittests/tsbuild.ts | 23 +- ...File-multiple-prologues-in-all-projects.js | 1686 +++++++++++++++++ ...ultiple-prologues-in-different-projects.js | 1578 +++++++++++++++ 3 files changed, 3286 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js create mode 100644 tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js diff --git a/src/testRunner/unittests/tsbuild.ts b/src/testRunner/unittests/tsbuild.ts index ceb73a335c5..a272fe0e824 100644 --- a/src/testRunner/unittests/tsbuild.ts +++ b/src/testRunner/unittests/tsbuild.ts @@ -581,7 +581,7 @@ export const b = new A();`); fs.writeFileSync(path, `${content}${additionalContent}`); } - // Strict + // Prologues function enableStrict(fs: vfs.FileSystem, path: string) { replaceFileContent(fs, path, `"strict": false`, `"strict": true`); } @@ -594,6 +594,27 @@ export const b = new A();`); enableStrict(fs, "src/second/tsconfig.json"); }); + function addPrologue(fs: vfs.FileSystem, path: string, prologue: string) { + prependFileContent(fs, path, `${prologue} +`); + } + verifyOutFileScenario("multiple prologues in all projects", fs => { + enableStrict(fs, "src/first/tsconfig.json"); + addPrologue(fs, "src/first/first_PART1.ts", `"myPrologue"`); + enableStrict(fs, "src/second/tsconfig.json"); + addPrologue(fs, "src/second/second_part1.ts", `"myPrologue"`); + addPrologue(fs, "src/second/second_part2.ts", `"myPrologue2";`); + enableStrict(fs, "src/third/tsconfig.json"); + addPrologue(fs, "src/third/third_part1.ts", `"myPrologue";`); + addPrologue(fs, "src/third/third_part1.ts", `"myPrologue3";`); + }); + verifyOutFileScenario("multiple prologues in different projects", fs => { + enableStrict(fs, "src/first/tsconfig.json"); + addPrologue(fs, "src/second/second_part1.ts", `"myPrologue"`); + addPrologue(fs, "src/second/second_part2.ts", `"myPrologue2";`); + enableStrict(fs, "src/third/tsconfig.json"); + }); + // Shebang function addShebang(fs: vfs.FileSystem, project: string, file: string) { prependFileContent(fs, `src/${project}/${file}.ts`, `#!someshebang ${project} ${file} diff --git a/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js b/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js new file mode 100644 index 00000000000..ca0e106ad3e --- /dev/null +++ b/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js @@ -0,0 +1,1686 @@ +//// [/src/2/second-output.d.ts] +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map + +//// [/src/2/second-output.d.ts.map] +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AACA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd"} + +//// [/src/2/second-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: second-output.d.ts +mapUrl: second-output.d.ts.map +sourceRoot: +sources: ../second/second_part1.ts,../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/2/second-output.d.ts +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>declare namespace N { +1 > +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1 >"myPrologue" + > +2 >namespace +3 > N +4 > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 19) Source(2, 11) + SourceIndex(0) +3 >Emitted(1, 20) Source(2, 12) + SourceIndex(0) +4 >Emitted(1, 21) Source(2, 13) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^-> +1 >{ + > // Comment text + >} +1 >Emitted(2, 2) Source(4, 2) + SourceIndex(0) +--- +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> + > + > +2 >namespace +3 > N +4 > +1->Emitted(3, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(3, 19) Source(6, 11) + SourceIndex(0) +3 >Emitted(3, 20) Source(6, 12) + SourceIndex(0) +4 >Emitted(3, 21) Source(6, 13) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^-> +1 >{ + > function f() { + > console.log('testing'); + > } + > + > f(); + >} +1 >Emitted(4, 2) Source(12, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.d.ts +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>declare class C { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^-> +1->"myPrologue2"; + > +2 >class +3 > C +1->Emitted(5, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(5, 15) Source(2, 7) + SourceIndex(1) +3 >Emitted(5, 16) Source(2, 8) + SourceIndex(1) +--- +>>> doSomething(): void; +1->^^^^ +2 > ^^^^^^^^^^^ +1-> { + > +2 > doSomething +1->Emitted(6, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(6, 16) Source(3, 16) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >() { + > console.log("something got done"); + > } + >} +1 >Emitted(7, 2) Source(6, 2) + SourceIndex(1) +--- +>>>//# sourceMappingURL=second-output.d.ts.map + +//// [/src/2/second-output.js] +"use strict"; +"myPrologue"; +"myPrologue2"; +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map + +//// [/src/2/second-output.js.map] +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":";AAAA,YAAY,CAAA;ACAZ,aAAa,CAAC;ADKd,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} + +//// [/src/2/second-output.js.map.baseline.txt] +=================================================================== +JsFile: second-output.js +mapUrl: second-output.js.map +sourceRoot: +sources: ../second/second_part1.ts,../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>"myPrologue"; +1 > +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^-> +1 > +2 >"myPrologue" +3 > +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +3 >Emitted(2, 14) Source(1, 13) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>"myPrologue2"; +1-> +2 >^^^^^^^^^^^^^ +3 > ^ +1-> +2 >"myPrologue2" +3 > ; +1->Emitted(3, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(3, 14) Source(1, 14) + SourceIndex(1) +3 >Emitted(3, 15) Source(1, 15) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>var N; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >"myPrologue" + >namespace N { + > // Comment text + >} + > + > +2 >namespace +3 > N +4 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1 >Emitted(4, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(4, 5) Source(6, 11) + SourceIndex(0) +3 >Emitted(4, 6) Source(6, 12) + SourceIndex(0) +4 >Emitted(4, 7) Source(12, 2) + SourceIndex(0) +--- +>>>(function (N) { +1-> +2 >^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1-> +2 >namespace +3 > N +1->Emitted(5, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(5, 12) Source(6, 11) + SourceIndex(0) +3 >Emitted(5, 13) Source(6, 12) + SourceIndex(0) +--- +>>> function f() { +1->^^^^ +2 > ^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^-> +1-> { + > +2 > function +3 > f +1->Emitted(6, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(6, 14) Source(7, 14) + SourceIndex(0) +3 >Emitted(6, 15) Source(7, 15) + SourceIndex(0) +--- +>>> console.log('testing'); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^ +8 > ^ +1->() { + > +2 > console +3 > . +4 > log +5 > ( +6 > 'testing' +7 > ) +8 > ; +1->Emitted(7, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(7, 16) Source(8, 16) + SourceIndex(0) +3 >Emitted(7, 17) Source(8, 17) + SourceIndex(0) +4 >Emitted(7, 20) Source(8, 20) + SourceIndex(0) +5 >Emitted(7, 21) Source(8, 21) + SourceIndex(0) +6 >Emitted(7, 30) Source(8, 30) + SourceIndex(0) +7 >Emitted(7, 31) Source(8, 31) + SourceIndex(0) +8 >Emitted(7, 32) Source(8, 32) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^-> +1 > + > +2 > } +1 >Emitted(8, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(9, 6) + SourceIndex(0) +--- +>>> f(); +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^^^^^^^^^-> +1-> + > + > +2 > f +3 > () +4 > ; +1->Emitted(9, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(9, 6) Source(11, 6) + SourceIndex(0) +3 >Emitted(9, 8) Source(11, 8) + SourceIndex(0) +4 >Emitted(9, 9) Source(11, 9) + SourceIndex(0) +--- +>>>})(N || (N = {})); +1-> +2 >^ +3 > ^^ +4 > ^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^ +8 > ^^^^^-> +1-> + > +2 >} +3 > +4 > N +5 > +6 > N +7 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1->Emitted(10, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(10, 2) Source(12, 2) + SourceIndex(0) +3 >Emitted(10, 4) Source(6, 11) + SourceIndex(0) +4 >Emitted(10, 5) Source(6, 12) + SourceIndex(0) +5 >Emitted(10, 10) Source(6, 11) + SourceIndex(0) +6 >Emitted(10, 11) Source(6, 12) + SourceIndex(0) +7 >Emitted(10, 19) Source(12, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>var C = (function () { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1->"myPrologue2"; + > +1->Emitted(11, 1) Source(2, 1) + SourceIndex(1) +--- +>>> function C() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(12, 5) Source(2, 1) + SourceIndex(1) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class C { + > doSomething() { + > console.log("something got done"); + > } + > +2 > } +1->Emitted(13, 5) Source(6, 1) + SourceIndex(1) +2 >Emitted(13, 6) Source(6, 2) + SourceIndex(1) +--- +>>> C.prototype.doSomething = function () { +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^-> +1-> +2 > doSomething +3 > +1->Emitted(14, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(14, 28) Source(3, 16) + SourceIndex(1) +3 >Emitted(14, 31) Source(3, 5) + SourceIndex(1) +--- +>>> console.log("something got done"); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1->doSomething() { + > +2 > console +3 > . +4 > log +5 > ( +6 > "something got done" +7 > ) +8 > ; +1->Emitted(15, 9) Source(4, 9) + SourceIndex(1) +2 >Emitted(15, 16) Source(4, 16) + SourceIndex(1) +3 >Emitted(15, 17) Source(4, 17) + SourceIndex(1) +4 >Emitted(15, 20) Source(4, 20) + SourceIndex(1) +5 >Emitted(15, 21) Source(4, 21) + SourceIndex(1) +6 >Emitted(15, 41) Source(4, 41) + SourceIndex(1) +7 >Emitted(15, 42) Source(4, 42) + SourceIndex(1) +8 >Emitted(15, 43) Source(4, 43) + SourceIndex(1) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(16, 5) Source(5, 5) + SourceIndex(1) +2 >Emitted(16, 6) Source(5, 6) + SourceIndex(1) +--- +>>> return C; +1->^^^^ +2 > ^^^^^^^^ +1-> + > +2 > } +1->Emitted(17, 5) Source(6, 1) + SourceIndex(1) +2 >Emitted(17, 13) Source(6, 2) + SourceIndex(1) +--- +>>>}()); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class C { + > doSomething() { + > console.log("something got done"); + > } + > } +1 >Emitted(18, 1) Source(6, 1) + SourceIndex(1) +2 >Emitted(18, 2) Source(6, 2) + SourceIndex(1) +3 >Emitted(18, 2) Source(2, 1) + SourceIndex(1) +4 >Emitted(18, 6) Source(6, 2) + SourceIndex(1) +--- +>>>//# sourceMappingURL=second-output.js.map + +//// [/src/first/bin/first-output.d.ts] +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map + +//// [/src/first/bin/first-output.d.ts.map] +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AACA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AETD,iBAAS,CAAC,WAET"} + +//// [/src/first/bin/first-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: first-output.d.ts +mapUrl: first-output.d.ts.map +sourceRoot: +sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.d.ts +sourceFile:../first_PART1.ts +------------------------------------------------------------------- +>>>interface TheFirst { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^ +1 >"myPrologue" + > +2 >interface +3 > TheFirst +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 11) Source(2, 11) + SourceIndex(0) +3 >Emitted(1, 19) Source(2, 19) + SourceIndex(0) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(2, 5) Source(3, 5) + SourceIndex(0) +2 >Emitted(2, 9) Source(3, 9) + SourceIndex(0) +3 >Emitted(2, 11) Source(3, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(3, 14) + SourceIndex(0) +5 >Emitted(2, 15) Source(3, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(3, 2) Source(4, 2) + SourceIndex(0) +--- +>>>declare const s = "Hello, world"; +1-> +2 >^^^^^^^^ +3 > ^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^ +1-> + > + > +2 > +3 > const +4 > s +5 > = "Hello, world" +6 > ; +1->Emitted(4, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(4, 9) Source(6, 1) + SourceIndex(0) +3 >Emitted(4, 15) Source(6, 7) + SourceIndex(0) +4 >Emitted(4, 16) Source(6, 8) + SourceIndex(0) +5 >Emitted(4, 33) Source(6, 25) + SourceIndex(0) +6 >Emitted(4, 34) Source(6, 26) + SourceIndex(0) +--- +>>>interface NoJsForHereEither { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > + > + > +2 >interface +3 > NoJsForHereEither +1 >Emitted(5, 1) Source(8, 1) + SourceIndex(0) +2 >Emitted(5, 11) Source(8, 11) + SourceIndex(0) +3 >Emitted(5, 28) Source(8, 28) + SourceIndex(0) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(6, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(6, 9) Source(9, 9) + SourceIndex(0) +3 >Emitted(6, 11) Source(9, 11) + SourceIndex(0) +4 >Emitted(6, 14) Source(9, 14) + SourceIndex(0) +5 >Emitted(6, 15) Source(9, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(7, 2) Source(10, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.d.ts +sourceFile:../first_part3.ts +------------------------------------------------------------------- +>>>declare function f(): string; +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^^^^^^^^^^^-> +1-> +2 >function +3 > f +4 > () { + > return "JS does hoists"; + > } +1->Emitted(8, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(8, 18) Source(1, 10) + SourceIndex(2) +3 >Emitted(8, 19) Source(1, 11) + SourceIndex(2) +4 >Emitted(8, 30) Source(3, 2) + SourceIndex(2) +--- +>>>//# sourceMappingURL=first-output.d.ts.map + +//// [/src/first/bin/first-output.js] +"use strict"; +"myPrologue"; +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map + +//// [/src/first/bin/first-output.js.map] +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAAA,YAAY,CAAA;AAKZ,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} + +//// [/src/first/bin/first-output.js.map.baseline.txt] +=================================================================== +JsFile: first-output.js +mapUrl: first-output.js.map +sourceRoot: +sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_PART1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>"myPrologue"; +1 > +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^-> +1 > +2 >"myPrologue" +3 > +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 13) Source(1, 13) + SourceIndex(0) +3 >Emitted(2, 14) Source(1, 13) + SourceIndex(0) +--- +>>>var s = "Hello, world"; +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^^^^^^^^^^ +6 > ^ +1-> + >interface TheFirst { + > none: any; + >} + > + > +2 >const +3 > s +4 > = +5 > "Hello, world" +6 > ; +1->Emitted(3, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(6, 7) + SourceIndex(0) +3 >Emitted(3, 6) Source(6, 8) + SourceIndex(0) +4 >Emitted(3, 9) Source(6, 11) + SourceIndex(0) +5 >Emitted(3, 23) Source(6, 25) + SourceIndex(0) +6 >Emitted(3, 24) Source(6, 26) + SourceIndex(0) +--- +>>>console.log(s); +1 > +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^-> +1 > + > + >interface NoJsForHereEither { + > none: any; + >} + > + > +2 >console +3 > . +4 > log +5 > ( +6 > s +7 > ) +8 > ; +1 >Emitted(4, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(4, 8) Source(12, 8) + SourceIndex(0) +3 >Emitted(4, 9) Source(12, 9) + SourceIndex(0) +4 >Emitted(4, 12) Source(12, 12) + SourceIndex(0) +5 >Emitted(4, 13) Source(12, 13) + SourceIndex(0) +6 >Emitted(4, 14) Source(12, 14) + SourceIndex(0) +7 >Emitted(4, 15) Source(12, 15) + SourceIndex(0) +8 >Emitted(4, 16) Source(12, 16) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_part2.ts +------------------------------------------------------------------- +>>>console.log(f()); +1-> +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^ +1-> +2 >console +3 > . +4 > log +5 > ( +6 > f +7 > () +8 > ) +9 > ; +1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(5, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(5, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(5, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(5, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(5, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(5, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(5, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(5, 18) Source(1, 18) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_part3.ts +------------------------------------------------------------------- +>>>function f() { +1 > +2 >^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^-> +1 > +2 >function +3 > f +1 >Emitted(6, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(6, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(6, 11) Source(1, 11) + SourceIndex(2) +--- +>>> return "JS does hoists"; +1->^^^^ +2 > ^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^ +1->() { + > +2 > return +3 > "JS does hoists" +4 > ; +1->Emitted(7, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(7, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(7, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(7, 29) Source(2, 29) + SourceIndex(2) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(8, 2) Source(3, 2) + SourceIndex(2) +--- +>>>//# sourceMappingURL=first-output.js.map + +//// [/src/first/first_PART1.ts] +"myPrologue" +interface TheFirst { + none: any; +} + +const s = "Hello, world"; + +interface NoJsForHereEither { + none: any; +} + +console.log(s); + + +//// [/src/first/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": true, + "sourceMap": true, + "declarationMap": true, + "outFile": "./bin/first-output.js", + "skipDefaultLibCheck": true + }, + "files": [ + "first_PART1.ts", + "first_part2.ts", + "first_part3.ts" + ], + "references": [ + ] +} + + +//// [/src/second/second_part1.ts] +"myPrologue" +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} + + +//// [/src/second/second_part2.ts] +"myPrologue2"; +class C { + doSomething() { + console.log("something got done"); + } +} + + +//// [/src/second/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": true, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "../2/second-output.js", + "skipDefaultLibCheck": true + }, + "references": [ + ] +} + + +//// [/src/third/thirdjs/output/third-output.d.ts] +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +declare var c: C; +//# sourceMappingURL=third-output.d.ts.map + +//// [/src/third/thirdjs/output/third-output.d.ts.map] +{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../third_part1.ts","../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts"],"names":[],"mappings":"ACCA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACTD,iBAAS,CAAC,WAET;;ACDD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;AJHD,QAAA,IAAI,CAAC,GAAU,CAAC"} + +//// [/src/third/thirdjs/output/third-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: third-output.d.ts +mapUrl: third-output.d.ts.map +sourceRoot: +sources: ../../third_part1.ts,../../../first/first_PART1.ts,../../../first/first_part3.ts,../../../second/second_part1.ts,../../../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../first/first_PART1.ts +------------------------------------------------------------------- +>>>interface TheFirst { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^ +1 >"myPrologue" + > +2 >interface +3 > TheFirst +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(1, 11) Source(2, 11) + SourceIndex(1) +3 >Emitted(1, 19) Source(2, 19) + SourceIndex(1) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(2, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(2, 9) Source(3, 9) + SourceIndex(1) +3 >Emitted(2, 11) Source(3, 11) + SourceIndex(1) +4 >Emitted(2, 14) Source(3, 14) + SourceIndex(1) +5 >Emitted(2, 15) Source(3, 15) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(3, 2) Source(4, 2) + SourceIndex(1) +--- +>>>declare const s = "Hello, world"; +1-> +2 >^^^^^^^^ +3 > ^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^ +1-> + > + > +2 > +3 > const +4 > s +5 > = "Hello, world" +6 > ; +1->Emitted(4, 1) Source(6, 1) + SourceIndex(1) +2 >Emitted(4, 9) Source(6, 1) + SourceIndex(1) +3 >Emitted(4, 15) Source(6, 7) + SourceIndex(1) +4 >Emitted(4, 16) Source(6, 8) + SourceIndex(1) +5 >Emitted(4, 33) Source(6, 25) + SourceIndex(1) +6 >Emitted(4, 34) Source(6, 26) + SourceIndex(1) +--- +>>>interface NoJsForHereEither { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > + > + > +2 >interface +3 > NoJsForHereEither +1 >Emitted(5, 1) Source(8, 1) + SourceIndex(1) +2 >Emitted(5, 11) Source(8, 11) + SourceIndex(1) +3 >Emitted(5, 28) Source(8, 28) + SourceIndex(1) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(6, 5) Source(9, 5) + SourceIndex(1) +2 >Emitted(6, 9) Source(9, 9) + SourceIndex(1) +3 >Emitted(6, 11) Source(9, 11) + SourceIndex(1) +4 >Emitted(6, 14) Source(9, 14) + SourceIndex(1) +5 >Emitted(6, 15) Source(9, 15) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(7, 2) Source(10, 2) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../first/first_part3.ts +------------------------------------------------------------------- +>>>declare function f(): string; +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^-> +1-> +2 >function +3 > f +4 > () { + > return "JS does hoists"; + > } +1->Emitted(8, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(8, 18) Source(1, 10) + SourceIndex(2) +3 >Emitted(8, 19) Source(1, 11) + SourceIndex(2) +4 >Emitted(8, 30) Source(3, 2) + SourceIndex(2) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=first-output.d.ts.map +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1->"myPrologue" + > +2 >namespace +3 > N +4 > +1->Emitted(10, 1) Source(2, 1) + SourceIndex(3) +2 >Emitted(10, 19) Source(2, 11) + SourceIndex(3) +3 >Emitted(10, 20) Source(2, 12) + SourceIndex(3) +4 >Emitted(10, 21) Source(2, 13) + SourceIndex(3) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^-> +1 >{ + > // Comment text + >} +1 >Emitted(11, 2) Source(4, 2) + SourceIndex(3) +--- +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> + > + > +2 >namespace +3 > N +4 > +1->Emitted(12, 1) Source(6, 1) + SourceIndex(3) +2 >Emitted(12, 19) Source(6, 11) + SourceIndex(3) +3 >Emitted(12, 20) Source(6, 12) + SourceIndex(3) +4 >Emitted(12, 21) Source(6, 13) + SourceIndex(3) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^-> +1 >{ + > function f() { + > console.log('testing'); + > } + > + > f(); + >} +1 >Emitted(13, 2) Source(12, 2) + SourceIndex(3) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>declare class C { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^-> +1->"myPrologue2"; + > +2 >class +3 > C +1->Emitted(14, 1) Source(2, 1) + SourceIndex(4) +2 >Emitted(14, 15) Source(2, 7) + SourceIndex(4) +3 >Emitted(14, 16) Source(2, 8) + SourceIndex(4) +--- +>>> doSomething(): void; +1->^^^^ +2 > ^^^^^^^^^^^ +1-> { + > +2 > doSomething +1->Emitted(15, 5) Source(3, 5) + SourceIndex(4) +2 >Emitted(15, 16) Source(3, 16) + SourceIndex(4) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >() { + > console.log("something got done"); + > } + >} +1 >Emitted(16, 2) Source(6, 2) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../third_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=second-output.d.ts.map +>>>declare var c: C; +1-> +2 >^^^^^^^^ +3 > ^^^^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1->"myPrologue3"; + >"myPrologue"; + > +2 > +3 > var +4 > c +5 > = new C() +6 > ; +1->Emitted(18, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(18, 9) Source(3, 1) + SourceIndex(0) +3 >Emitted(18, 13) Source(3, 5) + SourceIndex(0) +4 >Emitted(18, 14) Source(3, 6) + SourceIndex(0) +5 >Emitted(18, 17) Source(3, 16) + SourceIndex(0) +6 >Emitted(18, 18) Source(3, 17) + SourceIndex(0) +--- +>>>//# sourceMappingURL=third-output.d.ts.map + +//// [/src/third/thirdjs/output/third-output.js] +"use strict"; +"myPrologue3"; +"myPrologue"; +"use strict"; +"myPrologue"; +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +"use strict"; +"myPrologue"; +"myPrologue2"; +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +var c = new C(); +c.doSomething(); +//# sourceMappingURL=third-output.js.map + +//// [/src/third/thirdjs/output/third-output.js.map] +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts","../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts"],"names":[],"mappings":";AAAA,aAAa,CAAC;AACd,YAAY,CAAC;;ACDb,YAAY,CAAA;AAKZ,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACXf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;;;ACFD,YAAY,CAAA;ACAZ,aAAa,CAAC;ADKd,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;;ALHD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} + +//// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] +=================================================================== +JsFile: third-output.js +mapUrl: third-output.js.map +sourceRoot: +sources: ../../third_part1.ts,../../../first/first_PART1.ts,../../../first/first_part2.ts,../../../first/first_part3.ts,../../../second/second_part1.ts,../../../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../third_part1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>"myPrologue3"; +1 > +2 >^^^^^^^^^^^^^ +3 > ^ +1 > +2 >"myPrologue3" +3 > ; +1 >Emitted(2, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 14) Source(1, 14) + SourceIndex(0) +3 >Emitted(2, 15) Source(1, 15) + SourceIndex(0) +--- +>>>"myPrologue"; +1 > +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^-> +1 > + > +2 >"myPrologue" +3 > ; +1 >Emitted(3, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(3, 13) Source(2, 13) + SourceIndex(0) +3 >Emitted(3, 14) Source(2, 14) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_PART1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>"myPrologue"; +1-> +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^-> +1-> +2 >"myPrologue" +3 > +1->Emitted(5, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(5, 13) Source(1, 13) + SourceIndex(1) +3 >Emitted(5, 14) Source(1, 13) + SourceIndex(1) +--- +>>>var s = "Hello, world"; +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^^^^^^^^^^ +6 > ^ +1-> + >interface TheFirst { + > none: any; + >} + > + > +2 >const +3 > s +4 > = +5 > "Hello, world" +6 > ; +1->Emitted(6, 1) Source(6, 1) + SourceIndex(1) +2 >Emitted(6, 5) Source(6, 7) + SourceIndex(1) +3 >Emitted(6, 6) Source(6, 8) + SourceIndex(1) +4 >Emitted(6, 9) Source(6, 11) + SourceIndex(1) +5 >Emitted(6, 23) Source(6, 25) + SourceIndex(1) +6 >Emitted(6, 24) Source(6, 26) + SourceIndex(1) +--- +>>>console.log(s); +1 > +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^-> +1 > + > + >interface NoJsForHereEither { + > none: any; + >} + > + > +2 >console +3 > . +4 > log +5 > ( +6 > s +7 > ) +8 > ; +1 >Emitted(7, 1) Source(12, 1) + SourceIndex(1) +2 >Emitted(7, 8) Source(12, 8) + SourceIndex(1) +3 >Emitted(7, 9) Source(12, 9) + SourceIndex(1) +4 >Emitted(7, 12) Source(12, 12) + SourceIndex(1) +5 >Emitted(7, 13) Source(12, 13) + SourceIndex(1) +6 >Emitted(7, 14) Source(12, 14) + SourceIndex(1) +7 >Emitted(7, 15) Source(12, 15) + SourceIndex(1) +8 >Emitted(7, 16) Source(12, 16) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_part2.ts +------------------------------------------------------------------- +>>>console.log(f()); +1-> +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^ +1-> +2 >console +3 > . +4 > log +5 > ( +6 > f +7 > () +8 > ) +9 > ; +1->Emitted(8, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(8, 8) Source(1, 8) + SourceIndex(2) +3 >Emitted(8, 9) Source(1, 9) + SourceIndex(2) +4 >Emitted(8, 12) Source(1, 12) + SourceIndex(2) +5 >Emitted(8, 13) Source(1, 13) + SourceIndex(2) +6 >Emitted(8, 14) Source(1, 14) + SourceIndex(2) +7 >Emitted(8, 16) Source(1, 16) + SourceIndex(2) +8 >Emitted(8, 17) Source(1, 17) + SourceIndex(2) +9 >Emitted(8, 18) Source(1, 18) + SourceIndex(2) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_part3.ts +------------------------------------------------------------------- +>>>function f() { +1 > +2 >^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^-> +1 > +2 >function +3 > f +1 >Emitted(9, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(9, 10) Source(1, 10) + SourceIndex(3) +3 >Emitted(9, 11) Source(1, 11) + SourceIndex(3) +--- +>>> return "JS does hoists"; +1->^^^^ +2 > ^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^ +1->() { + > +2 > return +3 > "JS does hoists" +4 > ; +1->Emitted(10, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(10, 12) Source(2, 12) + SourceIndex(3) +3 >Emitted(10, 28) Source(2, 28) + SourceIndex(3) +4 >Emitted(10, 29) Source(2, 29) + SourceIndex(3) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(11, 1) Source(3, 1) + SourceIndex(3) +2 >Emitted(11, 2) Source(3, 2) + SourceIndex(3) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=first-output.js.map +>>>"use strict"; +>>>"myPrologue"; +1-> +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^-> +1-> +2 >"myPrologue" +3 > +1->Emitted(14, 1) Source(1, 1) + SourceIndex(4) +2 >Emitted(14, 13) Source(1, 13) + SourceIndex(4) +3 >Emitted(14, 14) Source(1, 13) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>"myPrologue2"; +1-> +2 >^^^^^^^^^^^^^ +3 > ^ +1-> +2 >"myPrologue2" +3 > ; +1->Emitted(15, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(15, 14) Source(1, 14) + SourceIndex(5) +3 >Emitted(15, 15) Source(1, 15) + SourceIndex(5) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>var N; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >"myPrologue" + >namespace N { + > // Comment text + >} + > + > +2 >namespace +3 > N +4 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1 >Emitted(16, 1) Source(6, 1) + SourceIndex(4) +2 >Emitted(16, 5) Source(6, 11) + SourceIndex(4) +3 >Emitted(16, 6) Source(6, 12) + SourceIndex(4) +4 >Emitted(16, 7) Source(12, 2) + SourceIndex(4) +--- +>>>(function (N) { +1-> +2 >^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1-> +2 >namespace +3 > N +1->Emitted(17, 1) Source(6, 1) + SourceIndex(4) +2 >Emitted(17, 12) Source(6, 11) + SourceIndex(4) +3 >Emitted(17, 13) Source(6, 12) + SourceIndex(4) +--- +>>> function f() { +1->^^^^ +2 > ^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^-> +1-> { + > +2 > function +3 > f +1->Emitted(18, 5) Source(7, 5) + SourceIndex(4) +2 >Emitted(18, 14) Source(7, 14) + SourceIndex(4) +3 >Emitted(18, 15) Source(7, 15) + SourceIndex(4) +--- +>>> console.log('testing'); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^ +8 > ^ +1->() { + > +2 > console +3 > . +4 > log +5 > ( +6 > 'testing' +7 > ) +8 > ; +1->Emitted(19, 9) Source(8, 9) + SourceIndex(4) +2 >Emitted(19, 16) Source(8, 16) + SourceIndex(4) +3 >Emitted(19, 17) Source(8, 17) + SourceIndex(4) +4 >Emitted(19, 20) Source(8, 20) + SourceIndex(4) +5 >Emitted(19, 21) Source(8, 21) + SourceIndex(4) +6 >Emitted(19, 30) Source(8, 30) + SourceIndex(4) +7 >Emitted(19, 31) Source(8, 31) + SourceIndex(4) +8 >Emitted(19, 32) Source(8, 32) + SourceIndex(4) +--- +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^-> +1 > + > +2 > } +1 >Emitted(20, 5) Source(9, 5) + SourceIndex(4) +2 >Emitted(20, 6) Source(9, 6) + SourceIndex(4) +--- +>>> f(); +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^^^^^^^^^-> +1-> + > + > +2 > f +3 > () +4 > ; +1->Emitted(21, 5) Source(11, 5) + SourceIndex(4) +2 >Emitted(21, 6) Source(11, 6) + SourceIndex(4) +3 >Emitted(21, 8) Source(11, 8) + SourceIndex(4) +4 >Emitted(21, 9) Source(11, 9) + SourceIndex(4) +--- +>>>})(N || (N = {})); +1-> +2 >^ +3 > ^^ +4 > ^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^ +8 > ^^^^^-> +1-> + > +2 >} +3 > +4 > N +5 > +6 > N +7 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1->Emitted(22, 1) Source(12, 1) + SourceIndex(4) +2 >Emitted(22, 2) Source(12, 2) + SourceIndex(4) +3 >Emitted(22, 4) Source(6, 11) + SourceIndex(4) +4 >Emitted(22, 5) Source(6, 12) + SourceIndex(4) +5 >Emitted(22, 10) Source(6, 11) + SourceIndex(4) +6 >Emitted(22, 11) Source(6, 12) + SourceIndex(4) +7 >Emitted(22, 19) Source(12, 2) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>var C = (function () { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1->"myPrologue2"; + > +1->Emitted(23, 1) Source(2, 1) + SourceIndex(5) +--- +>>> function C() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(24, 5) Source(2, 1) + SourceIndex(5) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class C { + > doSomething() { + > console.log("something got done"); + > } + > +2 > } +1->Emitted(25, 5) Source(6, 1) + SourceIndex(5) +2 >Emitted(25, 6) Source(6, 2) + SourceIndex(5) +--- +>>> C.prototype.doSomething = function () { +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^-> +1-> +2 > doSomething +3 > +1->Emitted(26, 5) Source(3, 5) + SourceIndex(5) +2 >Emitted(26, 28) Source(3, 16) + SourceIndex(5) +3 >Emitted(26, 31) Source(3, 5) + SourceIndex(5) +--- +>>> console.log("something got done"); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1->doSomething() { + > +2 > console +3 > . +4 > log +5 > ( +6 > "something got done" +7 > ) +8 > ; +1->Emitted(27, 9) Source(4, 9) + SourceIndex(5) +2 >Emitted(27, 16) Source(4, 16) + SourceIndex(5) +3 >Emitted(27, 17) Source(4, 17) + SourceIndex(5) +4 >Emitted(27, 20) Source(4, 20) + SourceIndex(5) +5 >Emitted(27, 21) Source(4, 21) + SourceIndex(5) +6 >Emitted(27, 41) Source(4, 41) + SourceIndex(5) +7 >Emitted(27, 42) Source(4, 42) + SourceIndex(5) +8 >Emitted(27, 43) Source(4, 43) + SourceIndex(5) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(28, 5) Source(5, 5) + SourceIndex(5) +2 >Emitted(28, 6) Source(5, 6) + SourceIndex(5) +--- +>>> return C; +1->^^^^ +2 > ^^^^^^^^ +1-> + > +2 > } +1->Emitted(29, 5) Source(6, 1) + SourceIndex(5) +2 >Emitted(29, 13) Source(6, 2) + SourceIndex(5) +--- +>>>}()); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class C { + > doSomething() { + > console.log("something got done"); + > } + > } +1 >Emitted(30, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(30, 2) Source(6, 2) + SourceIndex(5) +3 >Emitted(30, 2) Source(2, 1) + SourceIndex(5) +4 >Emitted(30, 6) Source(6, 2) + SourceIndex(5) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../third_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=second-output.js.map +>>>var c = new C(); +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^-> +1->"myPrologue3"; + >"myPrologue"; + > +2 >var +3 > c +4 > = +5 > new +6 > C +7 > () +8 > ; +1->Emitted(32, 1) Source(3, 1) + SourceIndex(0) +2 >Emitted(32, 5) Source(3, 5) + SourceIndex(0) +3 >Emitted(32, 6) Source(3, 6) + SourceIndex(0) +4 >Emitted(32, 9) Source(3, 9) + SourceIndex(0) +5 >Emitted(32, 13) Source(3, 13) + SourceIndex(0) +6 >Emitted(32, 14) Source(3, 14) + SourceIndex(0) +7 >Emitted(32, 16) Source(3, 16) + SourceIndex(0) +8 >Emitted(32, 17) Source(3, 17) + SourceIndex(0) +--- +>>>c.doSomething(); +1-> +2 >^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >c +3 > . +4 > doSomething +5 > () +6 > ; +1->Emitted(33, 1) Source(4, 1) + SourceIndex(0) +2 >Emitted(33, 2) Source(4, 2) + SourceIndex(0) +3 >Emitted(33, 3) Source(4, 3) + SourceIndex(0) +4 >Emitted(33, 14) Source(4, 14) + SourceIndex(0) +5 >Emitted(33, 16) Source(4, 16) + SourceIndex(0) +6 >Emitted(33, 17) Source(4, 17) + SourceIndex(0) +--- +>>>//# sourceMappingURL=third-output.js.map + +//// [/src/third/third_part1.ts] +"myPrologue3"; +"myPrologue"; +var c = new C(); +c.doSomething(); + + +//// [/src/third/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": true, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "./thirdjs/output/third-output.js", + "skipDefaultLibCheck": true + }, + "files": [ + "third_part1.ts" + ], + "references": [ + { "path": "../first", "prepend": true }, + { "path": "../second", "prepend": true }, + ] +} + + diff --git a/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js b/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js new file mode 100644 index 00000000000..0744f263935 --- /dev/null +++ b/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js @@ -0,0 +1,1578 @@ +//// [/src/2/second-output.d.ts] +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map + +//// [/src/2/second-output.d.ts.map] +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AACA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd"} + +//// [/src/2/second-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: second-output.d.ts +mapUrl: second-output.d.ts.map +sourceRoot: +sources: ../second/second_part1.ts,../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/2/second-output.d.ts +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>declare namespace N { +1 > +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1 >"myPrologue" + > +2 >namespace +3 > N +4 > +1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(1, 19) Source(2, 11) + SourceIndex(0) +3 >Emitted(1, 20) Source(2, 12) + SourceIndex(0) +4 >Emitted(1, 21) Source(2, 13) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^-> +1 >{ + > // Comment text + >} +1 >Emitted(2, 2) Source(4, 2) + SourceIndex(0) +--- +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> + > + > +2 >namespace +3 > N +4 > +1->Emitted(3, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(3, 19) Source(6, 11) + SourceIndex(0) +3 >Emitted(3, 20) Source(6, 12) + SourceIndex(0) +4 >Emitted(3, 21) Source(6, 13) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^-> +1 >{ + > function f() { + > console.log('testing'); + > } + > + > f(); + >} +1 >Emitted(4, 2) Source(12, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.d.ts +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>declare class C { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^-> +1->"myPrologue2"; + > +2 >class +3 > C +1->Emitted(5, 1) Source(2, 1) + SourceIndex(1) +2 >Emitted(5, 15) Source(2, 7) + SourceIndex(1) +3 >Emitted(5, 16) Source(2, 8) + SourceIndex(1) +--- +>>> doSomething(): void; +1->^^^^ +2 > ^^^^^^^^^^^ +1-> { + > +2 > doSomething +1->Emitted(6, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(6, 16) Source(3, 16) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >() { + > console.log("something got done"); + > } + >} +1 >Emitted(7, 2) Source(6, 2) + SourceIndex(1) +--- +>>>//# sourceMappingURL=second-output.d.ts.map + +//// [/src/2/second-output.js] +"myPrologue"; +"myPrologue2"; +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map + +//// [/src/2/second-output.js.map] +{"version":3,"file":"second-output.js","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;ACAZ,aAAa,CAAC;ADKd,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC"} + +//// [/src/2/second-output.js.map.baseline.txt] +=================================================================== +JsFile: second-output.js +mapUrl: second-output.js.map +sourceRoot: +sources: ../second/second_part1.ts,../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>"myPrologue"; +1 > +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^-> +1 > +2 >"myPrologue" +3 > +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 13) Source(1, 13) + SourceIndex(0) +3 >Emitted(1, 14) Source(1, 13) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>"myPrologue2"; +1-> +2 >^^^^^^^^^^^^^ +3 > ^ +1-> +2 >"myPrologue2" +3 > ; +1->Emitted(2, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(2, 14) Source(1, 14) + SourceIndex(1) +3 >Emitted(2, 15) Source(1, 15) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part1.ts +------------------------------------------------------------------- +>>>var N; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >"myPrologue" + >namespace N { + > // Comment text + >} + > + > +2 >namespace +3 > N +4 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1 >Emitted(3, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(3, 5) Source(6, 11) + SourceIndex(0) +3 >Emitted(3, 6) Source(6, 12) + SourceIndex(0) +4 >Emitted(3, 7) Source(12, 2) + SourceIndex(0) +--- +>>>(function (N) { +1-> +2 >^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1-> +2 >namespace +3 > N +1->Emitted(4, 1) Source(6, 1) + SourceIndex(0) +2 >Emitted(4, 12) Source(6, 11) + SourceIndex(0) +3 >Emitted(4, 13) Source(6, 12) + SourceIndex(0) +--- +>>> function f() { +1->^^^^ +2 > ^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^-> +1-> { + > +2 > function +3 > f +1->Emitted(5, 5) Source(7, 5) + SourceIndex(0) +2 >Emitted(5, 14) Source(7, 14) + SourceIndex(0) +3 >Emitted(5, 15) Source(7, 15) + SourceIndex(0) +--- +>>> console.log('testing'); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^ +8 > ^ +1->() { + > +2 > console +3 > . +4 > log +5 > ( +6 > 'testing' +7 > ) +8 > ; +1->Emitted(6, 9) Source(8, 9) + SourceIndex(0) +2 >Emitted(6, 16) Source(8, 16) + SourceIndex(0) +3 >Emitted(6, 17) Source(8, 17) + SourceIndex(0) +4 >Emitted(6, 20) Source(8, 20) + SourceIndex(0) +5 >Emitted(6, 21) Source(8, 21) + SourceIndex(0) +6 >Emitted(6, 30) Source(8, 30) + SourceIndex(0) +7 >Emitted(6, 31) Source(8, 31) + SourceIndex(0) +8 >Emitted(6, 32) Source(8, 32) + SourceIndex(0) +--- +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^-> +1 > + > +2 > } +1 >Emitted(7, 5) Source(9, 5) + SourceIndex(0) +2 >Emitted(7, 6) Source(9, 6) + SourceIndex(0) +--- +>>> f(); +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^^^^^^^^^-> +1-> + > + > +2 > f +3 > () +4 > ; +1->Emitted(8, 5) Source(11, 5) + SourceIndex(0) +2 >Emitted(8, 6) Source(11, 6) + SourceIndex(0) +3 >Emitted(8, 8) Source(11, 8) + SourceIndex(0) +4 >Emitted(8, 9) Source(11, 9) + SourceIndex(0) +--- +>>>})(N || (N = {})); +1-> +2 >^ +3 > ^^ +4 > ^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^ +8 > ^^^^^-> +1-> + > +2 >} +3 > +4 > N +5 > +6 > N +7 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1->Emitted(9, 1) Source(12, 1) + SourceIndex(0) +2 >Emitted(9, 2) Source(12, 2) + SourceIndex(0) +3 >Emitted(9, 4) Source(6, 11) + SourceIndex(0) +4 >Emitted(9, 5) Source(6, 12) + SourceIndex(0) +5 >Emitted(9, 10) Source(6, 11) + SourceIndex(0) +6 >Emitted(9, 11) Source(6, 12) + SourceIndex(0) +7 >Emitted(9, 19) Source(12, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/2/second-output.js +sourceFile:../second/second_part2.ts +------------------------------------------------------------------- +>>>var C = (function () { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1->"myPrologue2"; + > +1->Emitted(10, 1) Source(2, 1) + SourceIndex(1) +--- +>>> function C() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(11, 5) Source(2, 1) + SourceIndex(1) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class C { + > doSomething() { + > console.log("something got done"); + > } + > +2 > } +1->Emitted(12, 5) Source(6, 1) + SourceIndex(1) +2 >Emitted(12, 6) Source(6, 2) + SourceIndex(1) +--- +>>> C.prototype.doSomething = function () { +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^-> +1-> +2 > doSomething +3 > +1->Emitted(13, 5) Source(3, 5) + SourceIndex(1) +2 >Emitted(13, 28) Source(3, 16) + SourceIndex(1) +3 >Emitted(13, 31) Source(3, 5) + SourceIndex(1) +--- +>>> console.log("something got done"); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1->doSomething() { + > +2 > console +3 > . +4 > log +5 > ( +6 > "something got done" +7 > ) +8 > ; +1->Emitted(14, 9) Source(4, 9) + SourceIndex(1) +2 >Emitted(14, 16) Source(4, 16) + SourceIndex(1) +3 >Emitted(14, 17) Source(4, 17) + SourceIndex(1) +4 >Emitted(14, 20) Source(4, 20) + SourceIndex(1) +5 >Emitted(14, 21) Source(4, 21) + SourceIndex(1) +6 >Emitted(14, 41) Source(4, 41) + SourceIndex(1) +7 >Emitted(14, 42) Source(4, 42) + SourceIndex(1) +8 >Emitted(14, 43) Source(4, 43) + SourceIndex(1) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(15, 5) Source(5, 5) + SourceIndex(1) +2 >Emitted(15, 6) Source(5, 6) + SourceIndex(1) +--- +>>> return C; +1->^^^^ +2 > ^^^^^^^^ +1-> + > +2 > } +1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) +2 >Emitted(16, 13) Source(6, 2) + SourceIndex(1) +--- +>>>}()); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class C { + > doSomething() { + > console.log("something got done"); + > } + > } +1 >Emitted(17, 1) Source(6, 1) + SourceIndex(1) +2 >Emitted(17, 2) Source(6, 2) + SourceIndex(1) +3 >Emitted(17, 2) Source(2, 1) + SourceIndex(1) +4 >Emitted(17, 6) Source(6, 2) + SourceIndex(1) +--- +>>>//# sourceMappingURL=second-output.js.map + +//// [/src/first/bin/first-output.d.ts] +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map + +//// [/src/first/bin/first-output.d.ts.map] +{"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} + +//// [/src/first/bin/first-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: first-output.d.ts +mapUrl: first-output.d.ts.map +sourceRoot: +sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.d.ts +sourceFile:../first_PART1.ts +------------------------------------------------------------------- +>>>interface TheFirst { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^ +1 > +2 >interface +3 > TheFirst +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(1, 11) Source(1, 11) + SourceIndex(0) +3 >Emitted(1, 19) Source(1, 19) + SourceIndex(0) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(2, 5) Source(2, 5) + SourceIndex(0) +2 >Emitted(2, 9) Source(2, 9) + SourceIndex(0) +3 >Emitted(2, 11) Source(2, 11) + SourceIndex(0) +4 >Emitted(2, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(2, 15) Source(2, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(3, 2) Source(3, 2) + SourceIndex(0) +--- +>>>declare const s = "Hello, world"; +1-> +2 >^^^^^^^^ +3 > ^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^ +1-> + > + > +2 > +3 > const +4 > s +5 > = "Hello, world" +6 > ; +1->Emitted(4, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(4, 9) Source(5, 1) + SourceIndex(0) +3 >Emitted(4, 15) Source(5, 7) + SourceIndex(0) +4 >Emitted(4, 16) Source(5, 8) + SourceIndex(0) +5 >Emitted(4, 33) Source(5, 25) + SourceIndex(0) +6 >Emitted(4, 34) Source(5, 26) + SourceIndex(0) +--- +>>>interface NoJsForHereEither { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > + > + > +2 >interface +3 > NoJsForHereEither +1 >Emitted(5, 1) Source(7, 1) + SourceIndex(0) +2 >Emitted(5, 11) Source(7, 11) + SourceIndex(0) +3 >Emitted(5, 28) Source(7, 28) + SourceIndex(0) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(0) +2 >Emitted(6, 9) Source(8, 9) + SourceIndex(0) +3 >Emitted(6, 11) Source(8, 11) + SourceIndex(0) +4 >Emitted(6, 14) Source(8, 14) + SourceIndex(0) +5 >Emitted(6, 15) Source(8, 15) + SourceIndex(0) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(7, 2) Source(9, 2) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.d.ts +sourceFile:../first_part3.ts +------------------------------------------------------------------- +>>>declare function f(): string; +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^^^^^^^^^^^-> +1-> +2 >function +3 > f +4 > () { + > return "JS does hoists"; + > } +1->Emitted(8, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(8, 18) Source(1, 10) + SourceIndex(2) +3 >Emitted(8, 19) Source(1, 11) + SourceIndex(2) +4 >Emitted(8, 30) Source(3, 2) + SourceIndex(2) +--- +>>>//# sourceMappingURL=first-output.d.ts.map + +//// [/src/first/bin/first-output.js] +"use strict"; +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map + +//// [/src/first/bin/first-output.js.map] +{"version":3,"file":"first-output.js","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":";AAIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC"} + +//// [/src/first/bin/first-output.js.map.baseline.txt] +=================================================================== +JsFile: first-output.js +mapUrl: first-output.js.map +sourceRoot: +sources: ../first_PART1.ts,../first_part2.ts,../first_part3.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_PART1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>var s = "Hello, world"; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^^^^^^^^^^ +6 > ^ +1 >interface TheFirst { + > none: any; + >} + > + > +2 >const +3 > s +4 > = +5 > "Hello, world" +6 > ; +1 >Emitted(2, 1) Source(5, 1) + SourceIndex(0) +2 >Emitted(2, 5) Source(5, 7) + SourceIndex(0) +3 >Emitted(2, 6) Source(5, 8) + SourceIndex(0) +4 >Emitted(2, 9) Source(5, 11) + SourceIndex(0) +5 >Emitted(2, 23) Source(5, 25) + SourceIndex(0) +6 >Emitted(2, 24) Source(5, 26) + SourceIndex(0) +--- +>>>console.log(s); +1 > +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^-> +1 > + > + >interface NoJsForHereEither { + > none: any; + >} + > + > +2 >console +3 > . +4 > log +5 > ( +6 > s +7 > ) +8 > ; +1 >Emitted(3, 1) Source(11, 1) + SourceIndex(0) +2 >Emitted(3, 8) Source(11, 8) + SourceIndex(0) +3 >Emitted(3, 9) Source(11, 9) + SourceIndex(0) +4 >Emitted(3, 12) Source(11, 12) + SourceIndex(0) +5 >Emitted(3, 13) Source(11, 13) + SourceIndex(0) +6 >Emitted(3, 14) Source(11, 14) + SourceIndex(0) +7 >Emitted(3, 15) Source(11, 15) + SourceIndex(0) +8 >Emitted(3, 16) Source(11, 16) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_part2.ts +------------------------------------------------------------------- +>>>console.log(f()); +1-> +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^ +1-> +2 >console +3 > . +4 > log +5 > ( +6 > f +7 > () +8 > ) +9 > ; +1->Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(1, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(1, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(1, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(1, 14) + SourceIndex(1) +7 >Emitted(4, 16) Source(1, 16) + SourceIndex(1) +8 >Emitted(4, 17) Source(1, 17) + SourceIndex(1) +9 >Emitted(4, 18) Source(1, 18) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/first/bin/first-output.js +sourceFile:../first_part3.ts +------------------------------------------------------------------- +>>>function f() { +1 > +2 >^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^-> +1 > +2 >function +3 > f +1 >Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 10) Source(1, 10) + SourceIndex(2) +3 >Emitted(5, 11) Source(1, 11) + SourceIndex(2) +--- +>>> return "JS does hoists"; +1->^^^^ +2 > ^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^ +1->() { + > +2 > return +3 > "JS does hoists" +4 > ; +1->Emitted(6, 5) Source(2, 5) + SourceIndex(2) +2 >Emitted(6, 12) Source(2, 12) + SourceIndex(2) +3 >Emitted(6, 28) Source(2, 28) + SourceIndex(2) +4 >Emitted(6, 29) Source(2, 29) + SourceIndex(2) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(7, 1) Source(3, 1) + SourceIndex(2) +2 >Emitted(7, 2) Source(3, 2) + SourceIndex(2) +--- +>>>//# sourceMappingURL=first-output.js.map + +//// [/src/first/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": true, + "sourceMap": true, + "declarationMap": true, + "outFile": "./bin/first-output.js", + "skipDefaultLibCheck": true + }, + "files": [ + "first_PART1.ts", + "first_part2.ts", + "first_part3.ts" + ], + "references": [ + ] +} + + +//// [/src/second/second_part1.ts] +"myPrologue" +namespace N { + // Comment text +} + +namespace N { + function f() { + console.log('testing'); + } + + f(); +} + + +//// [/src/second/second_part2.ts] +"myPrologue2"; +class C { + doSomething() { + console.log("something got done"); + } +} + + +//// [/src/third/thirdjs/output/third-output.d.ts] +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +declare var c: C; +//# sourceMappingURL=third-output.d.ts.map + +//// [/src/third/thirdjs/output/third-output.d.ts.map] +{"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../third_part1.ts","../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts"],"names":[],"mappings":"ACAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;;ACDD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;AJLD,QAAA,IAAI,CAAC,GAAU,CAAC"} + +//// [/src/third/thirdjs/output/third-output.d.ts.map.baseline.txt] +=================================================================== +JsFile: third-output.d.ts +mapUrl: third-output.d.ts.map +sourceRoot: +sources: ../../third_part1.ts,../../../first/first_PART1.ts,../../../first/first_part3.ts,../../../second/second_part1.ts,../../../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../first/first_PART1.ts +------------------------------------------------------------------- +>>>interface TheFirst { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^ +1 > +2 >interface +3 > TheFirst +1 >Emitted(1, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(1, 11) Source(1, 11) + SourceIndex(1) +3 >Emitted(1, 19) Source(1, 19) + SourceIndex(1) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(2, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(2, 9) Source(2, 9) + SourceIndex(1) +3 >Emitted(2, 11) Source(2, 11) + SourceIndex(1) +4 >Emitted(2, 14) Source(2, 14) + SourceIndex(1) +5 >Emitted(2, 15) Source(2, 15) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(3, 2) Source(3, 2) + SourceIndex(1) +--- +>>>declare const s = "Hello, world"; +1-> +2 >^^^^^^^^ +3 > ^^^^^^ +4 > ^ +5 > ^^^^^^^^^^^^^^^^^ +6 > ^ +1-> + > + > +2 > +3 > const +4 > s +5 > = "Hello, world" +6 > ; +1->Emitted(4, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(4, 9) Source(5, 1) + SourceIndex(1) +3 >Emitted(4, 15) Source(5, 7) + SourceIndex(1) +4 >Emitted(4, 16) Source(5, 8) + SourceIndex(1) +5 >Emitted(4, 33) Source(5, 25) + SourceIndex(1) +6 >Emitted(4, 34) Source(5, 26) + SourceIndex(1) +--- +>>>interface NoJsForHereEither { +1 > +2 >^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^ +1 > + > + > +2 >interface +3 > NoJsForHereEither +1 >Emitted(5, 1) Source(7, 1) + SourceIndex(1) +2 >Emitted(5, 11) Source(7, 11) + SourceIndex(1) +3 >Emitted(5, 28) Source(7, 28) + SourceIndex(1) +--- +>>> none: any; +1 >^^^^ +2 > ^^^^ +3 > ^^ +4 > ^^^ +5 > ^ +1 > { + > +2 > none +3 > : +4 > any +5 > ; +1 >Emitted(6, 5) Source(8, 5) + SourceIndex(1) +2 >Emitted(6, 9) Source(8, 9) + SourceIndex(1) +3 >Emitted(6, 11) Source(8, 11) + SourceIndex(1) +4 >Emitted(6, 14) Source(8, 14) + SourceIndex(1) +5 >Emitted(6, 15) Source(8, 15) + SourceIndex(1) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + >} +1 >Emitted(7, 2) Source(9, 2) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../first/first_part3.ts +------------------------------------------------------------------- +>>>declare function f(): string; +1-> +2 >^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^^^^^^^^^^^^^-> +1-> +2 >function +3 > f +4 > () { + > return "JS does hoists"; + > } +1->Emitted(8, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(8, 18) Source(1, 10) + SourceIndex(2) +3 >Emitted(8, 19) Source(1, 11) + SourceIndex(2) +4 >Emitted(8, 30) Source(3, 2) + SourceIndex(2) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=first-output.d.ts.map +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1->"myPrologue" + > +2 >namespace +3 > N +4 > +1->Emitted(10, 1) Source(2, 1) + SourceIndex(3) +2 >Emitted(10, 19) Source(2, 11) + SourceIndex(3) +3 >Emitted(10, 20) Source(2, 12) + SourceIndex(3) +4 >Emitted(10, 21) Source(2, 13) + SourceIndex(3) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^-> +1 >{ + > // Comment text + >} +1 >Emitted(11, 2) Source(4, 2) + SourceIndex(3) +--- +>>>declare namespace N { +1-> +2 >^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^ +1-> + > + > +2 >namespace +3 > N +4 > +1->Emitted(12, 1) Source(6, 1) + SourceIndex(3) +2 >Emitted(12, 19) Source(6, 11) + SourceIndex(3) +3 >Emitted(12, 20) Source(6, 12) + SourceIndex(3) +4 >Emitted(12, 21) Source(6, 13) + SourceIndex(3) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^-> +1 >{ + > function f() { + > console.log('testing'); + > } + > + > f(); + >} +1 >Emitted(13, 2) Source(12, 2) + SourceIndex(3) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>declare class C { +1-> +2 >^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^-> +1->"myPrologue2"; + > +2 >class +3 > C +1->Emitted(14, 1) Source(2, 1) + SourceIndex(4) +2 >Emitted(14, 15) Source(2, 7) + SourceIndex(4) +3 >Emitted(14, 16) Source(2, 8) + SourceIndex(4) +--- +>>> doSomething(): void; +1->^^^^ +2 > ^^^^^^^^^^^ +1-> { + > +2 > doSomething +1->Emitted(15, 5) Source(3, 5) + SourceIndex(4) +2 >Emitted(15, 16) Source(3, 16) + SourceIndex(4) +--- +>>>} +1 >^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 >() { + > console.log("something got done"); + > } + >} +1 >Emitted(16, 2) Source(6, 2) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.d.ts +sourceFile:../../third_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=second-output.d.ts.map +>>>declare var c: C; +1-> +2 >^^^^^^^^ +3 > ^^^^ +4 > ^ +5 > ^^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> +2 > +3 > var +4 > c +5 > = new C() +6 > ; +1->Emitted(18, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(18, 9) Source(1, 1) + SourceIndex(0) +3 >Emitted(18, 13) Source(1, 5) + SourceIndex(0) +4 >Emitted(18, 14) Source(1, 6) + SourceIndex(0) +5 >Emitted(18, 17) Source(1, 16) + SourceIndex(0) +6 >Emitted(18, 18) Source(1, 17) + SourceIndex(0) +--- +>>>//# sourceMappingURL=third-output.d.ts.map + +//// [/src/third/thirdjs/output/third-output.js] +"use strict"; +"use strict"; +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +"myPrologue"; +"myPrologue2"; +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +var c = new C(); +c.doSomething(); +//# sourceMappingURL=third-output.js.map + +//// [/src/third/thirdjs/output/third-output.js.map] +{"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts","../../../first/first_PART1.ts","../../../first/first_part2.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts"],"names":[],"mappings":";;ACIA,IAAM,CAAC,GAAG,cAAc,CAAC;AAMzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;ACVf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;ACAjB,SAAS,CAAC;IACN,OAAO,gBAAgB,CAAC;AAC5B,CAAC;;ACFD,YAAY,CAAA;ACAZ,aAAa,CAAC;ADKd,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;IACP,SAAS,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAED,CAAC,EAAE,CAAC;AACR,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;ACVD;IAAA;IAIA,CAAC;IAHG,uBAAW,GAAX;QACI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;IACL,QAAC;AAAD,CAAC,AAJD,IAIC;;ALLD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} + +//// [/src/third/thirdjs/output/third-output.js.map.baseline.txt] +=================================================================== +JsFile: third-output.js +mapUrl: third-output.js.map +sourceRoot: +sources: ../../third_part1.ts,../../../first/first_PART1.ts,../../../first/first_part2.ts,../../../first/first_part3.ts,../../../second/second_part1.ts,../../../second/second_part2.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_PART1.ts +------------------------------------------------------------------- +>>>"use strict"; +>>>"use strict"; +>>>var s = "Hello, world"; +1 > +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^^^^^^^^^^^ +6 > ^ +1 >interface TheFirst { + > none: any; + >} + > + > +2 >const +3 > s +4 > = +5 > "Hello, world" +6 > ; +1 >Emitted(3, 1) Source(5, 1) + SourceIndex(1) +2 >Emitted(3, 5) Source(5, 7) + SourceIndex(1) +3 >Emitted(3, 6) Source(5, 8) + SourceIndex(1) +4 >Emitted(3, 9) Source(5, 11) + SourceIndex(1) +5 >Emitted(3, 23) Source(5, 25) + SourceIndex(1) +6 >Emitted(3, 24) Source(5, 26) + SourceIndex(1) +--- +>>>console.log(s); +1 > +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^ +8 > ^ +9 > ^^^-> +1 > + > + >interface NoJsForHereEither { + > none: any; + >} + > + > +2 >console +3 > . +4 > log +5 > ( +6 > s +7 > ) +8 > ; +1 >Emitted(4, 1) Source(11, 1) + SourceIndex(1) +2 >Emitted(4, 8) Source(11, 8) + SourceIndex(1) +3 >Emitted(4, 9) Source(11, 9) + SourceIndex(1) +4 >Emitted(4, 12) Source(11, 12) + SourceIndex(1) +5 >Emitted(4, 13) Source(11, 13) + SourceIndex(1) +6 >Emitted(4, 14) Source(11, 14) + SourceIndex(1) +7 >Emitted(4, 15) Source(11, 15) + SourceIndex(1) +8 >Emitted(4, 16) Source(11, 16) + SourceIndex(1) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_part2.ts +------------------------------------------------------------------- +>>>console.log(f()); +1-> +2 >^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^ +1-> +2 >console +3 > . +4 > log +5 > ( +6 > f +7 > () +8 > ) +9 > ; +1->Emitted(5, 1) Source(1, 1) + SourceIndex(2) +2 >Emitted(5, 8) Source(1, 8) + SourceIndex(2) +3 >Emitted(5, 9) Source(1, 9) + SourceIndex(2) +4 >Emitted(5, 12) Source(1, 12) + SourceIndex(2) +5 >Emitted(5, 13) Source(1, 13) + SourceIndex(2) +6 >Emitted(5, 14) Source(1, 14) + SourceIndex(2) +7 >Emitted(5, 16) Source(1, 16) + SourceIndex(2) +8 >Emitted(5, 17) Source(1, 17) + SourceIndex(2) +9 >Emitted(5, 18) Source(1, 18) + SourceIndex(2) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../first/first_part3.ts +------------------------------------------------------------------- +>>>function f() { +1 > +2 >^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^-> +1 > +2 >function +3 > f +1 >Emitted(6, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(6, 10) Source(1, 10) + SourceIndex(3) +3 >Emitted(6, 11) Source(1, 11) + SourceIndex(3) +--- +>>> return "JS does hoists"; +1->^^^^ +2 > ^^^^^^^ +3 > ^^^^^^^^^^^^^^^^ +4 > ^ +1->() { + > +2 > return +3 > "JS does hoists" +4 > ; +1->Emitted(7, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(7, 12) Source(2, 12) + SourceIndex(3) +3 >Emitted(7, 28) Source(2, 28) + SourceIndex(3) +4 >Emitted(7, 29) Source(2, 29) + SourceIndex(3) +--- +>>>} +1 > +2 >^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > + > +2 >} +1 >Emitted(8, 1) Source(3, 1) + SourceIndex(3) +2 >Emitted(8, 2) Source(3, 2) + SourceIndex(3) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=first-output.js.map +>>>"myPrologue"; +1-> +2 >^^^^^^^^^^^^ +3 > ^ +4 > ^^-> +1-> +2 >"myPrologue" +3 > +1->Emitted(10, 1) Source(1, 1) + SourceIndex(4) +2 >Emitted(10, 13) Source(1, 13) + SourceIndex(4) +3 >Emitted(10, 14) Source(1, 13) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>"myPrologue2"; +1-> +2 >^^^^^^^^^^^^^ +3 > ^ +1-> +2 >"myPrologue2" +3 > ; +1->Emitted(11, 1) Source(1, 1) + SourceIndex(5) +2 >Emitted(11, 14) Source(1, 14) + SourceIndex(5) +3 >Emitted(11, 15) Source(1, 15) + SourceIndex(5) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part1.ts +------------------------------------------------------------------- +>>>var N; +1 > +2 >^^^^ +3 > ^ +4 > ^ +5 > ^^^^^^^^^^-> +1 >"myPrologue" + >namespace N { + > // Comment text + >} + > + > +2 >namespace +3 > N +4 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1 >Emitted(12, 1) Source(6, 1) + SourceIndex(4) +2 >Emitted(12, 5) Source(6, 11) + SourceIndex(4) +3 >Emitted(12, 6) Source(6, 12) + SourceIndex(4) +4 >Emitted(12, 7) Source(12, 2) + SourceIndex(4) +--- +>>>(function (N) { +1-> +2 >^^^^^^^^^^^ +3 > ^ +4 > ^^^^^^^-> +1-> +2 >namespace +3 > N +1->Emitted(13, 1) Source(6, 1) + SourceIndex(4) +2 >Emitted(13, 12) Source(6, 11) + SourceIndex(4) +3 >Emitted(13, 13) Source(6, 12) + SourceIndex(4) +--- +>>> function f() { +1->^^^^ +2 > ^^^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^-> +1-> { + > +2 > function +3 > f +1->Emitted(14, 5) Source(7, 5) + SourceIndex(4) +2 >Emitted(14, 14) Source(7, 14) + SourceIndex(4) +3 >Emitted(14, 15) Source(7, 15) + SourceIndex(4) +--- +>>> console.log('testing'); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^ +7 > ^ +8 > ^ +1->() { + > +2 > console +3 > . +4 > log +5 > ( +6 > 'testing' +7 > ) +8 > ; +1->Emitted(15, 9) Source(8, 9) + SourceIndex(4) +2 >Emitted(15, 16) Source(8, 16) + SourceIndex(4) +3 >Emitted(15, 17) Source(8, 17) + SourceIndex(4) +4 >Emitted(15, 20) Source(8, 20) + SourceIndex(4) +5 >Emitted(15, 21) Source(8, 21) + SourceIndex(4) +6 >Emitted(15, 30) Source(8, 30) + SourceIndex(4) +7 >Emitted(15, 31) Source(8, 31) + SourceIndex(4) +8 >Emitted(15, 32) Source(8, 32) + SourceIndex(4) +--- +>>> } +1 >^^^^ +2 > ^ +3 > ^^^^-> +1 > + > +2 > } +1 >Emitted(16, 5) Source(9, 5) + SourceIndex(4) +2 >Emitted(16, 6) Source(9, 6) + SourceIndex(4) +--- +>>> f(); +1->^^^^ +2 > ^ +3 > ^^ +4 > ^ +5 > ^^^^^^^^^^^-> +1-> + > + > +2 > f +3 > () +4 > ; +1->Emitted(17, 5) Source(11, 5) + SourceIndex(4) +2 >Emitted(17, 6) Source(11, 6) + SourceIndex(4) +3 >Emitted(17, 8) Source(11, 8) + SourceIndex(4) +4 >Emitted(17, 9) Source(11, 9) + SourceIndex(4) +--- +>>>})(N || (N = {})); +1-> +2 >^ +3 > ^^ +4 > ^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^ +8 > ^^^^^-> +1-> + > +2 >} +3 > +4 > N +5 > +6 > N +7 > { + > function f() { + > console.log('testing'); + > } + > + > f(); + > } +1->Emitted(18, 1) Source(12, 1) + SourceIndex(4) +2 >Emitted(18, 2) Source(12, 2) + SourceIndex(4) +3 >Emitted(18, 4) Source(6, 11) + SourceIndex(4) +4 >Emitted(18, 5) Source(6, 12) + SourceIndex(4) +5 >Emitted(18, 10) Source(6, 11) + SourceIndex(4) +6 >Emitted(18, 11) Source(6, 12) + SourceIndex(4) +7 >Emitted(18, 19) Source(12, 2) + SourceIndex(4) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../../second/second_part2.ts +------------------------------------------------------------------- +>>>var C = (function () { +1-> +2 >^^^^^^^^^^^^^^^^^^^-> +1->"myPrologue2"; + > +1->Emitted(19, 1) Source(2, 1) + SourceIndex(5) +--- +>>> function C() { +1->^^^^ +2 > ^^-> +1-> +1->Emitted(20, 5) Source(2, 1) + SourceIndex(5) +--- +>>> } +1->^^^^ +2 > ^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1->class C { + > doSomething() { + > console.log("something got done"); + > } + > +2 > } +1->Emitted(21, 5) Source(6, 1) + SourceIndex(5) +2 >Emitted(21, 6) Source(6, 2) + SourceIndex(5) +--- +>>> C.prototype.doSomething = function () { +1->^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^ +4 > ^^^^^^^^^^^^^-> +1-> +2 > doSomething +3 > +1->Emitted(22, 5) Source(3, 5) + SourceIndex(5) +2 >Emitted(22, 28) Source(3, 16) + SourceIndex(5) +3 >Emitted(22, 31) Source(3, 5) + SourceIndex(5) +--- +>>> console.log("something got done"); +1->^^^^^^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^ +7 > ^ +8 > ^ +1->doSomething() { + > +2 > console +3 > . +4 > log +5 > ( +6 > "something got done" +7 > ) +8 > ; +1->Emitted(23, 9) Source(4, 9) + SourceIndex(5) +2 >Emitted(23, 16) Source(4, 16) + SourceIndex(5) +3 >Emitted(23, 17) Source(4, 17) + SourceIndex(5) +4 >Emitted(23, 20) Source(4, 20) + SourceIndex(5) +5 >Emitted(23, 21) Source(4, 21) + SourceIndex(5) +6 >Emitted(23, 41) Source(4, 41) + SourceIndex(5) +7 >Emitted(23, 42) Source(4, 42) + SourceIndex(5) +8 >Emitted(23, 43) Source(4, 43) + SourceIndex(5) +--- +>>> }; +1 >^^^^ +2 > ^ +3 > ^^^^^^^^^-> +1 > + > +2 > } +1 >Emitted(24, 5) Source(5, 5) + SourceIndex(5) +2 >Emitted(24, 6) Source(5, 6) + SourceIndex(5) +--- +>>> return C; +1->^^^^ +2 > ^^^^^^^^ +1-> + > +2 > } +1->Emitted(25, 5) Source(6, 1) + SourceIndex(5) +2 >Emitted(25, 13) Source(6, 2) + SourceIndex(5) +--- +>>>}()); +1 > +2 >^ +3 > +4 > ^^^^ +5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 >} +3 > +4 > class C { + > doSomething() { + > console.log("something got done"); + > } + > } +1 >Emitted(26, 1) Source(6, 1) + SourceIndex(5) +2 >Emitted(26, 2) Source(6, 2) + SourceIndex(5) +3 >Emitted(26, 2) Source(2, 1) + SourceIndex(5) +4 >Emitted(26, 6) Source(6, 2) + SourceIndex(5) +--- +------------------------------------------------------------------- +emittedFile:/src/third/thirdjs/output/third-output.js +sourceFile:../../third_part1.ts +------------------------------------------------------------------- +>>>//# sourceMappingURL=second-output.js.map +>>>var c = new C(); +1-> +2 >^^^^ +3 > ^ +4 > ^^^ +5 > ^^^^ +6 > ^ +7 > ^^ +8 > ^ +9 > ^-> +1-> +2 >var +3 > c +4 > = +5 > new +6 > C +7 > () +8 > ; +1->Emitted(28, 1) Source(1, 1) + SourceIndex(0) +2 >Emitted(28, 5) Source(1, 5) + SourceIndex(0) +3 >Emitted(28, 6) Source(1, 6) + SourceIndex(0) +4 >Emitted(28, 9) Source(1, 9) + SourceIndex(0) +5 >Emitted(28, 13) Source(1, 13) + SourceIndex(0) +6 >Emitted(28, 14) Source(1, 14) + SourceIndex(0) +7 >Emitted(28, 16) Source(1, 16) + SourceIndex(0) +8 >Emitted(28, 17) Source(1, 17) + SourceIndex(0) +--- +>>>c.doSomething(); +1-> +2 >^ +3 > ^ +4 > ^^^^^^^^^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 >c +3 > . +4 > doSomething +5 > () +6 > ; +1->Emitted(29, 1) Source(2, 1) + SourceIndex(0) +2 >Emitted(29, 2) Source(2, 2) + SourceIndex(0) +3 >Emitted(29, 3) Source(2, 3) + SourceIndex(0) +4 >Emitted(29, 14) Source(2, 14) + SourceIndex(0) +5 >Emitted(29, 16) Source(2, 16) + SourceIndex(0) +6 >Emitted(29, 17) Source(2, 17) + SourceIndex(0) +--- +>>>//# sourceMappingURL=third-output.js.map + +//// [/src/third/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "composite": true, + "removeComments": true, + "strict": true, + "sourceMap": true, + "declarationMap": true, + "declaration": true, + "outFile": "./thirdjs/output/third-output.js", + "skipDefaultLibCheck": true + }, + "files": [ + "third_part1.ts" + ], + "references": [ + { "path": "../first", "prepend": true }, + { "path": "../second", "prepend": true }, + ] +} + +