diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts
index c5e2282fd39..f3f8a86209c 100644
--- a/src/compiler/emitter.ts
+++ b/src/compiler/emitter.ts
@@ -562,7 +562,7 @@ namespace ts {
writeLine();
const pos = getTextPosWithWriteLine();
print(EmitHint.Unspecified, prepend, /*sourceFile*/ undefined);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prepend, fileName: (prepend as UnparsedSource).fileName });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prepend, data: (prepend as UnparsedSource).fileName });
}
const pos = getTextPosWithWriteLine();
@@ -1182,7 +1182,7 @@ namespace ts {
else {
writeLines(helper.text(makeFileLevelOptimisticUniqueName));
}
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.EmitHelpers, name: helper.name });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.EmitHelpers, data: helper.name });
helpersEmitted = true;
}
}
@@ -2974,19 +2974,19 @@ namespace ts {
for (const directive of files) {
const pos = writer.getTextPos();
writeComment(`/// `);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Reference, fileName: directive.fileName });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Reference, data: directive.fileName });
writeLine();
}
for (const directive of types) {
const pos = writer.getTextPos();
writeComment(`/// `);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Type, fileName: directive.fileName });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Type, data: directive.fileName });
writeLine();
}
for (const directive of libs) {
const pos = writer.getTextPos();
writeComment(`/// `);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Lib, fileName: directive.fileName });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Lib, data: directive.fileName });
writeLine();
}
}
@@ -3030,7 +3030,7 @@ namespace ts {
writeLine();
const pos = writer.getTextPos();
emit(statement);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prologue, text: statement.expression.text });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prologue, data: statement.expression.text });
if (seenPrologueDirectives) {
seenPrologueDirectives.set(statement.expression.text, true);
}
@@ -3047,13 +3047,13 @@ namespace ts {
function emitUnparsedPrologues(prologues: ReadonlyArray, seenPrologueDirectives: Map) {
for (const prologue of prologues) {
- if (!seenPrologueDirectives.has(prologue.text)) {
+ if (!seenPrologueDirectives.has(prologue.data)) {
writeLine();
const pos = writer.getTextPos();
emit(prologue);
- if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prologue, text: prologue.text });
+ if (bundleFileInfo) bundleFileInfo.push({ pos, end: writer.getTextPos(), kind: BundleFileSectionKind.Prologue, data: prologue.data });
if (seenPrologueDirectives) {
- seenPrologueDirectives.set(prologue.text, true);
+ seenPrologueDirectives.set(prologue.data, true);
}
}
}
diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts
index 4b2835ad0a3..24619f4fb7b 100644
--- a/src/compiler/factory.ts
+++ b/src/compiler/factory.ts
@@ -2678,35 +2678,27 @@ namespace ts {
for (const section of sections) {
switch (section.kind) {
case BundleFileSectionKind.Prologue:
- const unparsedPrologue = createUnparsedNode(SyntaxKind.UnparsedPrologue, section.pos, section.end, node);
- unparsedPrologue.text = section.text;
- (prologues || (prologues = [])).push(unparsedPrologue);
+ (prologues || (prologues = [])).push(createUnparsedNode(section, node) as UnparsedPrologue);
break;
case BundleFileSectionKind.EmitHelpers:
- (helpers || (helpers = [])).push(getAllUnscopedEmitHelpers().get(section.name)!);
+ (helpers || (helpers = [])).push(getAllUnscopedEmitHelpers().get(section.data)!);
break;
case BundleFileSectionKind.NoDefaultLib:
node.hasNoDefaultLib = true;
break;
case BundleFileSectionKind.Reference:
- (referencedFiles || (referencedFiles = [])).push({ pos: -1, end: -1, fileName: section.fileName });
+ (referencedFiles || (referencedFiles = [])).push({ pos: -1, end: -1, fileName: section.data });
break;
case BundleFileSectionKind.Type:
- (typeReferenceDirectives || (typeReferenceDirectives = [])).push(section.fileName);
+ (typeReferenceDirectives || (typeReferenceDirectives = [])).push(section.data);
break;
case BundleFileSectionKind.Lib:
- (libReferenceDirectives || (libReferenceDirectives = [])).push({ pos: -1, end: -1, fileName: section.fileName });
+ (libReferenceDirectives || (libReferenceDirectives = [])).push({ pos: -1, end: -1, fileName: section.data });
break;
case BundleFileSectionKind.Prepend:
- const unparsedPrependText = createUnparsedNode(SyntaxKind.UnparsedPrependText, section.pos, section.end, node);
- unparsedPrependText.fileName = section.fileName;
- (texts || (texts = [])).push(unparsedPrependText);
- break;
case BundleFileSectionKind.Text:
- (texts || (texts = [])).push(createUnparsedNode(SyntaxKind.UnparsedText, section.pos, section.end, node));
- break;
case BundleFileSectionKind.SourceMapUrl:
- (texts || (texts = [])).push(createUnparsedNode(SyntaxKind.UnparsedSourceMapUrl, section.pos, section.end, node));
+ (texts || (texts = [])).push(createUnparsedNode(section, node) as UnparsedSourceText);
break;
default:
Debug.assertNever(section);
@@ -2725,14 +2717,34 @@ namespace ts {
node.referencedFiles = referencedFiles || emptyArray;
node.typeReferenceDirectives = typeReferenceDirectives;
node.libReferenceDirectives = libReferenceDirectives || emptyArray;
- node.texts = texts || [createUnparsedNode(SyntaxKind.UnparsedText, 0, node.text.length, node)];
+ node.texts = texts || [createUnparsedNode({ kind: BundleFileSectionKind.Text, pos: 0, end: node.text.length }, node)];
node.getLineAndCharacterOfPosition = pos => getLineAndCharacterOfPosition(node, pos);
return node;
}
- function createUnparsedNode(kind: UnparsedNode["kind"], pos: number, end: number, parent: UnparsedSource) {
- const node = createNode(kind, pos, end) as UnparsedNode;
+ function mapBundleFileSectionKindToSyntaxKind(kind: BundleFileSectionKind): SyntaxKind {
+ switch (kind) {
+ case BundleFileSectionKind.Prologue: return SyntaxKind.UnparsedPrologue;
+ case BundleFileSectionKind.Prepend: return SyntaxKind.UnparsedPrependText;
+ case BundleFileSectionKind.Text: return SyntaxKind.UnparsedText;
+ case BundleFileSectionKind.SourceMapUrl: return SyntaxKind.UnparsedSourceMapUrl;
+
+ case BundleFileSectionKind.EmitHelpers:
+ case BundleFileSectionKind.NoDefaultLib:
+ case BundleFileSectionKind.Reference:
+ case BundleFileSectionKind.Type:
+ case BundleFileSectionKind.Lib:
+ return Debug.fail(`BundleFileSectionKind: ${kind} not yet mapped to SyntaxKind`);
+
+ default:
+ return Debug.assertNever(kind);
+ }
+ }
+
+ function createUnparsedNode(section: BundleFileSection, parent: UnparsedSource): UnparsedNode {
+ const node = createNode(mapBundleFileSectionKindToSyntaxKind(section.kind), section.pos, section.end) as UnparsedNode;
node.parent = parent;
+ node.data = section.data;
return node;
}
diff --git a/src/compiler/types.ts b/src/compiler/types.ts
index 54298268643..19d97d7bd58 100644
--- a/src/compiler/types.ts
+++ b/src/compiler/types.ts
@@ -2801,24 +2801,30 @@ namespace ts {
export type UnparsedSourceText = UnparsedPrependText | UnparsedText | UnparsedSourceMapUrl;
export type UnparsedNode = UnparsedPrologue | UnparsedSourceText;
- export interface UnparsedPrologue extends Node {
+ export interface UnparsedSection extends Node {
+ kind: SyntaxKind;
+ data?: string;
+ parent: UnparsedSource;
+ }
+
+ export interface UnparsedPrologue extends UnparsedSection {
kind: SyntaxKind.UnparsedPrologue;
- text: string;
+ data: string;
parent: UnparsedSource;
}
- export interface UnparsedPrependText extends Node {
+ export interface UnparsedPrependText extends UnparsedSection {
kind: SyntaxKind.UnparsedPrependText;
- fileName: string;
+ data: string;
parent: UnparsedSource;
}
- export interface UnparsedText extends Node {
+ export interface UnparsedText extends UnparsedSection {
kind: SyntaxKind.UnparsedText;
parent: UnparsedSource;
}
- export interface UnparsedSourceMapUrl extends Node {
+ export interface UnparsedSourceMapUrl extends UnparsedSection {
kind: SyntaxKind.UnparsedSourceMapUrl;
parent: UnparsedSource;
}
@@ -5474,18 +5480,19 @@ namespace ts {
/*@internal*/
export interface BundleFileSectionBase extends TextRange {
kind: BundleFileSectionKind;
+ data?: string;
}
/*@internal*/
export interface BundleFilePrologue extends BundleFileSectionBase {
kind: BundleFileSectionKind.Prologue;
- text: string;
+ data: string;
}
/*@internal*/
export interface BundleFileEmitHelpers extends BundleFileSectionBase {
kind: BundleFileSectionKind.EmitHelpers;
- name: string;
+ data: string;
}
/*@internal*/
@@ -5496,13 +5503,13 @@ namespace ts {
/*@internal*/
export interface BundleFileReference extends BundleFileSectionBase {
kind: BundleFileSectionKind.Reference | BundleFileSectionKind.Type | BundleFileSectionKind.Lib;
- fileName: string;
+ data: string;
}
/*@internal*/
export interface BundleFilePrepend extends BundleFileSectionBase {
kind: BundleFileSectionKind.Prepend;
- fileName: string;
+ data: string;
}
/*@internal*/
diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts
index b187e4c77d5..29bca8a21a3 100644
--- a/tests/baselines/reference/api/tsserverlibrary.d.ts
+++ b/tests/baselines/reference/api/tsserverlibrary.d.ts
@@ -356,40 +356,43 @@ declare namespace ts {
SpreadAssignment = 277,
EnumMember = 278,
UnparsedPrologue = 279,
- SourceFile = 280,
- Bundle = 281,
- UnparsedSource = 282,
- InputFiles = 283,
- JSDocTypeExpression = 284,
- JSDocAllType = 285,
- JSDocUnknownType = 286,
- JSDocNullableType = 287,
- JSDocNonNullableType = 288,
- JSDocOptionalType = 289,
- JSDocFunctionType = 290,
- JSDocVariadicType = 291,
- JSDocComment = 292,
- JSDocTypeLiteral = 293,
- JSDocSignature = 294,
- JSDocTag = 295,
- JSDocAugmentsTag = 296,
- JSDocClassTag = 297,
- JSDocCallbackTag = 298,
- JSDocEnumTag = 299,
- JSDocParameterTag = 300,
- JSDocReturnTag = 301,
- JSDocThisTag = 302,
- JSDocTypeTag = 303,
- JSDocTemplateTag = 304,
- JSDocTypedefTag = 305,
- JSDocPropertyTag = 306,
- SyntaxList = 307,
- NotEmittedStatement = 308,
- PartiallyEmittedExpression = 309,
- CommaListExpression = 310,
- MergeDeclarationMarker = 311,
- EndOfDeclarationMarker = 312,
- Count = 313,
+ UnparsedPrependText = 280,
+ UnparsedText = 281,
+ UnparsedSourceMapUrl = 282,
+ SourceFile = 283,
+ Bundle = 284,
+ UnparsedSource = 285,
+ InputFiles = 286,
+ JSDocTypeExpression = 287,
+ JSDocAllType = 288,
+ JSDocUnknownType = 289,
+ JSDocNullableType = 290,
+ JSDocNonNullableType = 291,
+ JSDocOptionalType = 292,
+ JSDocFunctionType = 293,
+ JSDocVariadicType = 294,
+ JSDocComment = 295,
+ JSDocTypeLiteral = 296,
+ JSDocSignature = 297,
+ JSDocTag = 298,
+ JSDocAugmentsTag = 299,
+ JSDocClassTag = 300,
+ JSDocCallbackTag = 301,
+ JSDocEnumTag = 302,
+ JSDocParameterTag = 303,
+ JSDocReturnTag = 304,
+ JSDocThisTag = 305,
+ JSDocTypeTag = 306,
+ JSDocTemplateTag = 307,
+ JSDocTypedefTag = 308,
+ JSDocPropertyTag = 309,
+ SyntaxList = 310,
+ NotEmittedStatement = 311,
+ PartiallyEmittedExpression = 312,
+ CommaListExpression = 313,
+ MergeDeclarationMarker = 314,
+ EndOfDeclarationMarker = 315,
+ Count = 316,
FirstAssignment = 59,
LastAssignment = 71,
FirstCompoundAssignment = 60,
@@ -415,10 +418,10 @@ declare namespace ts {
FirstBinaryOperator = 28,
LastBinaryOperator = 71,
FirstNode = 148,
- FirstJSDocNode = 284,
- LastJSDocNode = 306,
- FirstJSDocTagNode = 295,
- LastJSDocTagNode = 306
+ FirstJSDocNode = 287,
+ LastJSDocNode = 309,
+ FirstJSDocTagNode = 298,
+ LastJSDocTagNode = 309
}
enum NodeFlags {
None = 0,
@@ -1749,10 +1752,31 @@ declare namespace ts {
hasNoDefaultLib?: boolean;
sourceMapPath?: string;
sourceMapText?: string;
+ texts: ReadonlyArray;
}
- interface UnparsedPrologue extends Node {
+ type UnparsedSourceText = UnparsedPrependText | UnparsedText | UnparsedSourceMapUrl;
+ type UnparsedNode = UnparsedPrologue | UnparsedSourceText;
+ interface UnparsedSection extends Node {
+ kind: SyntaxKind;
+ data?: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedPrologue extends UnparsedSection {
kind: SyntaxKind.UnparsedPrologue;
- text: string;
+ data: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedPrependText extends UnparsedSection {
+ kind: SyntaxKind.UnparsedPrependText;
+ data: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedText extends UnparsedSection {
+ kind: SyntaxKind.UnparsedText;
+ parent: UnparsedSource;
+ }
+ interface UnparsedSourceMapUrl extends UnparsedSection {
+ kind: SyntaxKind.UnparsedSourceMapUrl;
parent: UnparsedSource;
}
interface JsonSourceFile extends SourceFile {
@@ -3466,7 +3490,7 @@ declare namespace ts {
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
function isUnparsedSource(node: Node): node is UnparsedSource;
- function isUnparsedPrologue(node: Node): node is UnparsedPrologue;
+ function isUnparsedNode(node: Node): node is UnparsedNode;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts
index ceb9159f565..b231a4ed01d 100644
--- a/tests/baselines/reference/api/typescript.d.ts
+++ b/tests/baselines/reference/api/typescript.d.ts
@@ -356,40 +356,43 @@ declare namespace ts {
SpreadAssignment = 277,
EnumMember = 278,
UnparsedPrologue = 279,
- SourceFile = 280,
- Bundle = 281,
- UnparsedSource = 282,
- InputFiles = 283,
- JSDocTypeExpression = 284,
- JSDocAllType = 285,
- JSDocUnknownType = 286,
- JSDocNullableType = 287,
- JSDocNonNullableType = 288,
- JSDocOptionalType = 289,
- JSDocFunctionType = 290,
- JSDocVariadicType = 291,
- JSDocComment = 292,
- JSDocTypeLiteral = 293,
- JSDocSignature = 294,
- JSDocTag = 295,
- JSDocAugmentsTag = 296,
- JSDocClassTag = 297,
- JSDocCallbackTag = 298,
- JSDocEnumTag = 299,
- JSDocParameterTag = 300,
- JSDocReturnTag = 301,
- JSDocThisTag = 302,
- JSDocTypeTag = 303,
- JSDocTemplateTag = 304,
- JSDocTypedefTag = 305,
- JSDocPropertyTag = 306,
- SyntaxList = 307,
- NotEmittedStatement = 308,
- PartiallyEmittedExpression = 309,
- CommaListExpression = 310,
- MergeDeclarationMarker = 311,
- EndOfDeclarationMarker = 312,
- Count = 313,
+ UnparsedPrependText = 280,
+ UnparsedText = 281,
+ UnparsedSourceMapUrl = 282,
+ SourceFile = 283,
+ Bundle = 284,
+ UnparsedSource = 285,
+ InputFiles = 286,
+ JSDocTypeExpression = 287,
+ JSDocAllType = 288,
+ JSDocUnknownType = 289,
+ JSDocNullableType = 290,
+ JSDocNonNullableType = 291,
+ JSDocOptionalType = 292,
+ JSDocFunctionType = 293,
+ JSDocVariadicType = 294,
+ JSDocComment = 295,
+ JSDocTypeLiteral = 296,
+ JSDocSignature = 297,
+ JSDocTag = 298,
+ JSDocAugmentsTag = 299,
+ JSDocClassTag = 300,
+ JSDocCallbackTag = 301,
+ JSDocEnumTag = 302,
+ JSDocParameterTag = 303,
+ JSDocReturnTag = 304,
+ JSDocThisTag = 305,
+ JSDocTypeTag = 306,
+ JSDocTemplateTag = 307,
+ JSDocTypedefTag = 308,
+ JSDocPropertyTag = 309,
+ SyntaxList = 310,
+ NotEmittedStatement = 311,
+ PartiallyEmittedExpression = 312,
+ CommaListExpression = 313,
+ MergeDeclarationMarker = 314,
+ EndOfDeclarationMarker = 315,
+ Count = 316,
FirstAssignment = 59,
LastAssignment = 71,
FirstCompoundAssignment = 60,
@@ -415,10 +418,10 @@ declare namespace ts {
FirstBinaryOperator = 28,
LastBinaryOperator = 71,
FirstNode = 148,
- FirstJSDocNode = 284,
- LastJSDocNode = 306,
- FirstJSDocTagNode = 295,
- LastJSDocTagNode = 306
+ FirstJSDocNode = 287,
+ LastJSDocNode = 309,
+ FirstJSDocTagNode = 298,
+ LastJSDocTagNode = 309
}
enum NodeFlags {
None = 0,
@@ -1749,10 +1752,31 @@ declare namespace ts {
hasNoDefaultLib?: boolean;
sourceMapPath?: string;
sourceMapText?: string;
+ texts: ReadonlyArray;
}
- interface UnparsedPrologue extends Node {
+ type UnparsedSourceText = UnparsedPrependText | UnparsedText | UnparsedSourceMapUrl;
+ type UnparsedNode = UnparsedPrologue | UnparsedSourceText;
+ interface UnparsedSection extends Node {
+ kind: SyntaxKind;
+ data?: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedPrologue extends UnparsedSection {
kind: SyntaxKind.UnparsedPrologue;
- text: string;
+ data: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedPrependText extends UnparsedSection {
+ kind: SyntaxKind.UnparsedPrependText;
+ data: string;
+ parent: UnparsedSource;
+ }
+ interface UnparsedText extends UnparsedSection {
+ kind: SyntaxKind.UnparsedText;
+ parent: UnparsedSource;
+ }
+ interface UnparsedSourceMapUrl extends UnparsedSection {
+ kind: SyntaxKind.UnparsedSourceMapUrl;
parent: UnparsedSource;
}
interface JsonSourceFile extends SourceFile {
@@ -3466,7 +3490,7 @@ declare namespace ts {
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
function isUnparsedSource(node: Node): node is UnparsedSource;
- function isUnparsedPrologue(node: Node): node is UnparsedPrologue;
+ function isUnparsedNode(node: Node): node is UnparsedNode;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
diff --git a/tests/baselines/reference/outFile-baseline-sectioned-sourcemaps.js b/tests/baselines/reference/outFile-baseline-sectioned-sourcemaps.js
index d965d023392..6c0101d3b67 100644
--- a/tests/baselines/reference/outFile-baseline-sectioned-sourcemaps.js
+++ b/tests/baselines/reference/outFile-baseline-sectioned-sourcemaps.js
@@ -746,13 +746,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 150,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 152,
"end": 478,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 480,
@@ -770,13 +770,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,
diff --git a/tests/baselines/reference/outFile-emitHelpers-in-all-projects.js b/tests/baselines/reference/outFile-emitHelpers-in-all-projects.js
index a01bbe28e7c..4b45b38cdb9 100644
--- a/tests/baselines/reference/outFile-emitHelpers-in-all-projects.js
+++ b/tests/baselines/reference/outFile-emitHelpers-in-all-projects.js
@@ -5,7 +5,7 @@
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
@@ -615,7 +615,7 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
@@ -1167,19 +1167,19 @@ class second2 extends second1 { }
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
"end": 1043,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 1045,
"end": 1673,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 1675,
@@ -1197,13 +1197,13 @@ class second2 extends second1 { }
"pos": 0,
"end": 268,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 270,
"end": 485,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 487,
diff --git a/tests/baselines/reference/outFile-emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/outFile-emitHelpers-in-only-one-dependency-project.js
index f3146f45471..d7bcc313ceb 100644
--- a/tests/baselines/reference/outFile-emitHelpers-in-only-one-dependency-project.js
+++ b/tests/baselines/reference/outFile-emitHelpers-in-only-one-dependency-project.js
@@ -5,7 +5,7 @@
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
@@ -959,19 +959,19 @@ class second2 extends second1 { }
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
"end": 749,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 751,
"end": 1379,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 1381,
@@ -989,13 +989,13 @@ class second2 extends second1 { }
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 416,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 418,
diff --git a/tests/baselines/reference/outFile-multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/outFile-multiple-emitHelpers-in-all-projects.js
index 89aafedae9c..c3ee414e456 100644
--- a/tests/baselines/reference/outFile-multiple-emitHelpers-in-all-projects.js
+++ b/tests/baselines/reference/outFile-multiple-emitHelpers-in-all-projects.js
@@ -5,19 +5,19 @@
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
"end": 1103,
"kind": "emitHelpers",
- "name": "typescript:read"
+ "data": "typescript:read"
},
{
"pos": 1105,
"end": 1275,
"kind": "emitHelpers",
- "name": "typescript:spread"
+ "data": "typescript:spread"
},
{
"pos": 1277,
@@ -802,19 +802,19 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
"end": 1103,
"kind": "emitHelpers",
- "name": "typescript:read"
+ "data": "typescript:read"
},
{
"pos": 1105,
"end": 1275,
"kind": "emitHelpers",
- "name": "typescript:spread"
+ "data": "typescript:spread"
},
{
"pos": 1277,
@@ -1598,31 +1598,31 @@ secondsecond_part2Spread(...[10, 20, 30]);
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
"end": 1103,
"kind": "emitHelpers",
- "name": "typescript:read"
+ "data": "typescript:read"
},
{
"pos": 1105,
"end": 1275,
"kind": "emitHelpers",
- "name": "typescript:spread"
+ "data": "typescript:spread"
},
{
"pos": 1277,
"end": 1933,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 1935,
"end": 2779,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 2781,
@@ -1640,13 +1640,13 @@ secondsecond_part2Spread(...[10, 20, 30]);
"pos": 0,
"end": 332,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 334,
"end": 615,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 617,
diff --git a/tests/baselines/reference/outFile-multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/outFile-multiple-emitHelpers-in-different-projects.js
index 1ac30513e08..0f94bc8ef48 100644
--- a/tests/baselines/reference/outFile-multiple-emitHelpers-in-different-projects.js
+++ b/tests/baselines/reference/outFile-multiple-emitHelpers-in-different-projects.js
@@ -5,7 +5,7 @@
"pos": 0,
"end": 597,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 599,
@@ -615,13 +615,13 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 504,
"kind": "emitHelpers",
- "name": "typescript:read"
+ "data": "typescript:read"
},
{
"pos": 506,
"end": 676,
"kind": "emitHelpers",
- "name": "typescript:spread"
+ "data": "typescript:spread"
},
{
"pos": 678,
@@ -1174,31 +1174,31 @@ class second2 extends second1 { }
"pos": 0,
"end": 504,
"kind": "emitHelpers",
- "name": "typescript:read"
+ "data": "typescript:read"
},
{
"pos": 506,
"end": 676,
"kind": "emitHelpers",
- "name": "typescript:spread"
+ "data": "typescript:spread"
},
{
"pos": 678,
"end": 1275,
"kind": "emitHelpers",
- "name": "typescript:extends"
+ "data": "typescript:extends"
},
{
"pos": 1277,
"end": 1639,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 1641,
"end": 2269,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 2271,
@@ -1216,13 +1216,13 @@ class second2 extends second1 { }
"pos": 0,
"end": 263,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 265,
"end": 480,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 482,
diff --git a/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js b/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js
index 0c1c3d734d4..6a2b72a7175 100644
--- a/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js
+++ b/tests/baselines/reference/outFile-multiple-prologues-in-all-projects.js
@@ -5,19 +5,19 @@
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 28,
"kind": "prologue",
- "text": "myPrologue"
+ "data": "myPrologue"
},
{
"pos": 30,
"end": 44,
"kind": "prologue",
- "text": "myPrologue2"
+ "data": "myPrologue2"
},
{
"pos": 46,
@@ -475,13 +475,13 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 28,
"kind": "prologue",
- "text": "myPrologue"
+ "data": "myPrologue"
},
{
"pos": 30,
@@ -911,37 +911,37 @@ class C {
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 28,
"kind": "prologue",
- "text": "myPrologue"
+ "data": "myPrologue"
},
{
"pos": 30,
"end": 44,
"kind": "prologue",
- "text": "myPrologue2"
+ "data": "myPrologue2"
},
{
"pos": 46,
"end": 60,
"kind": "prologue",
- "text": "myPrologue3"
+ "data": "myPrologue3"
},
{
"pos": 62,
"end": 212,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 214,
"end": 540,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 542,
@@ -959,13 +959,13 @@ class C {
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,
diff --git a/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js b/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js
index d8484b9ea88..469c10d79ce 100644
--- a/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js
+++ b/tests/baselines/reference/outFile-multiple-prologues-in-different-projects.js
@@ -5,13 +5,13 @@
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "myPrologue"
+ "data": "myPrologue"
},
{
"pos": 15,
"end": 29,
"kind": "prologue",
- "text": "myPrologue2"
+ "data": "myPrologue2"
},
{
"pos": 31,
@@ -467,7 +467,7 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
@@ -849,31 +849,31 @@ class C {
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 28,
"kind": "prologue",
- "text": "myPrologue"
+ "data": "myPrologue"
},
{
"pos": 30,
"end": 44,
"kind": "prologue",
- "text": "myPrologue2"
+ "data": "myPrologue2"
},
{
"pos": 46,
"end": 196,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 198,
"end": 524,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 526,
@@ -891,13 +891,13 @@ class C {
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,
diff --git a/tests/baselines/reference/outFile-shebang-in-all-projects.js b/tests/baselines/reference/outFile-shebang-in-all-projects.js
index 402ac6167d7..d86d9833569 100644
--- a/tests/baselines/reference/outFile-shebang-in-all-projects.js
+++ b/tests/baselines/reference/outFile-shebang-in-all-projects.js
@@ -794,13 +794,13 @@ namespace N {
"pos": 33,
"end": 183,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 185,
"end": 511,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 513,
@@ -818,13 +818,13 @@ namespace N {
"pos": 33,
"end": 232,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 234,
"end": 377,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 379,
diff --git a/tests/baselines/reference/outFile-shebang-in-only-one-dependency-project.js b/tests/baselines/reference/outFile-shebang-in-only-one-dependency-project.js
index 6b9b40c2664..d79db2f6f96 100644
--- a/tests/baselines/reference/outFile-shebang-in-only-one-dependency-project.js
+++ b/tests/baselines/reference/outFile-shebang-in-only-one-dependency-project.js
@@ -767,13 +767,13 @@ namespace N {
"pos": 35,
"end": 185,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 187,
"end": 513,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 515,
@@ -791,13 +791,13 @@ namespace N {
"pos": 35,
"end": 234,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 236,
"end": 379,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 381,
diff --git a/tests/baselines/reference/outFile-strict-in-all-projects.js b/tests/baselines/reference/outFile-strict-in-all-projects.js
index 90bfc0d6c67..e8c8f98b3fb 100644
--- a/tests/baselines/reference/outFile-strict-in-all-projects.js
+++ b/tests/baselines/reference/outFile-strict-in-all-projects.js
@@ -5,7 +5,7 @@
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
@@ -426,7 +426,7 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
@@ -802,19 +802,19 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 165,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 167,
"end": 493,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 495,
@@ -832,13 +832,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,
diff --git a/tests/baselines/reference/outFile-strict-in-one-dependency.js b/tests/baselines/reference/outFile-strict-in-one-dependency.js
index 5641f84a8b8..af887443f4b 100644
--- a/tests/baselines/reference/outFile-strict-in-one-dependency.js
+++ b/tests/baselines/reference/outFile-strict-in-one-dependency.js
@@ -5,7 +5,7 @@
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
@@ -772,19 +772,19 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 13,
"kind": "prologue",
- "text": "use strict"
+ "data": "use strict"
},
{
"pos": 15,
"end": 165,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 167,
"end": 493,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 495,
@@ -802,13 +802,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,
diff --git a/tests/baselines/reference/outFile-triple-slash-refs-in-all-projects.js b/tests/baselines/reference/outFile-triple-slash-refs-in-all-projects.js
index 910184c119b..c17e74732f4 100644
--- a/tests/baselines/reference/outFile-triple-slash-refs-in-all-projects.js
+++ b/tests/baselines/reference/outFile-triple-slash-refs-in-all-projects.js
@@ -17,7 +17,7 @@
"pos": 0,
"end": 49,
"kind": "reference",
- "fileName": "../second/tripleRef.d.ts"
+ "data": "../second/tripleRef.d.ts"
},
{
"pos": 51,
@@ -490,7 +490,7 @@ sourceFile:../second/second_part2.ts
"pos": 0,
"end": 42,
"kind": "reference",
- "fileName": "../tripleRef.d.ts"
+ "data": "../tripleRef.d.ts"
},
{
"pos": 44,
@@ -897,13 +897,13 @@ declare class secondsecond_part1 { }
"pos": 0,
"end": 198,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 200,
"end": 577,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 579,
@@ -921,31 +921,31 @@ declare class secondsecond_part1 { }
"pos": 0,
"end": 45,
"kind": "reference",
- "fileName": "../../tripleRef.d.ts"
+ "data": "../../tripleRef.d.ts"
},
{
"pos": 47,
"end": 101,
"kind": "reference",
- "fileName": "../../../first/tripleRef.d.ts"
+ "data": "../../../first/tripleRef.d.ts"
},
{
"pos": 103,
"end": 158,
"kind": "reference",
- "fileName": "../../../second/tripleRef.d.ts"
+ "data": "../../../second/tripleRef.d.ts"
},
{
"pos": 160,
"end": 410,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 412,
"end": 609,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 611,
diff --git a/tests/baselines/reference/outFile-triple-slash-refs-in-one-project.js b/tests/baselines/reference/outFile-triple-slash-refs-in-one-project.js
index cdd73b68dd8..43a5e66bb1a 100644
--- a/tests/baselines/reference/outFile-triple-slash-refs-in-one-project.js
+++ b/tests/baselines/reference/outFile-triple-slash-refs-in-one-project.js
@@ -17,7 +17,7 @@
"pos": 0,
"end": 49,
"kind": "reference",
- "fileName": "../second/tripleRef.d.ts"
+ "data": "../second/tripleRef.d.ts"
},
{
"pos": 51,
@@ -825,13 +825,13 @@ declare class secondsecond_part1 { }
"pos": 0,
"end": 150,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 152,
"end": 529,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 531,
@@ -849,19 +849,19 @@ declare class secondsecond_part1 { }
"pos": 0,
"end": 55,
"kind": "reference",
- "fileName": "../../../second/tripleRef.d.ts"
+ "data": "../../../second/tripleRef.d.ts"
},
{
"pos": 57,
"end": 256,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 258,
"end": 455,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 457,
diff --git a/tests/baselines/reference/outFile-when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/outFile-when-final-project-is-not-composite-but-uses-project-references.js
index 3599c4affdb..10d9b4fa191 100644
--- a/tests/baselines/reference/outFile-when-final-project-is-not-composite-but-uses-project-references.js
+++ b/tests/baselines/reference/outFile-when-final-project-is-not-composite-but-uses-project-references.js
@@ -746,13 +746,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 150,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.js"
+ "data": "/src/first/bin/first-output.js"
},
{
"pos": 152,
"end": 478,
"kind": "prepend",
- "fileName": "/src/2/second-output.js"
+ "data": "/src/2/second-output.js"
},
{
"pos": 480,
@@ -770,13 +770,13 @@ sourceFile:../first_part3.ts
"pos": 0,
"end": 199,
"kind": "prepend",
- "fileName": "/src/first/bin/first-output.d.ts"
+ "data": "/src/first/bin/first-output.d.ts"
},
{
"pos": 201,
"end": 344,
"kind": "prepend",
- "fileName": "/src/2/second-output.d.ts"
+ "data": "/src/2/second-output.d.ts"
},
{
"pos": 346,