@typescript-deploys/pr-build 4.7.0-pr-48792-4 → 4.7.0-pr-47461-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.7";
72
- ts.version = ts.versionMajorMinor + ".0-insiders.20220420";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220425";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -11209,7 +11209,7 @@ var ts;
11209
11209
  ts.getScriptTargetFeatures = getScriptTargetFeatures;
11210
11210
  function getLiteralText(node, sourceFile, flags) {
11211
11211
  var _a;
11212
- if (canUseOriginalText(node, flags)) {
11212
+ if (sourceFile && canUseOriginalText(node, flags)) {
11213
11213
  return getSourceTextOfNodeFromSourceFile(sourceFile, node);
11214
11214
  }
11215
11215
  switch (node.kind) {
@@ -13561,11 +13561,19 @@ var ts;
13561
13561
  return !!name && isDynamicName(name);
13562
13562
  }
13563
13563
  ts.hasDynamicName = hasDynamicName;
13564
+ function getComputedPropertyNameExpression(name) {
13565
+ return ts.isElementAccessExpression(name.expression)
13566
+ ? skipParentheses(name.expression.argumentExpression)
13567
+ : name.expression;
13568
+ }
13569
+ ts.getComputedPropertyNameExpression = getComputedPropertyNameExpression;
13564
13570
  function isDynamicName(name) {
13565
13571
  if (!(name.kind === 162 || name.kind === 207)) {
13566
13572
  return false;
13567
13573
  }
13568
- var expr = ts.isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression;
13574
+ var expr = ts.isElementAccessExpression(name)
13575
+ ? skipParentheses(name.argumentExpression)
13576
+ : getComputedPropertyNameExpression(name);
13569
13577
  return !isStringOrNumericLiteralLike(expr) &&
13570
13578
  !isSignedNumericLiteral(expr);
13571
13579
  }
@@ -13579,7 +13587,7 @@ var ts;
13579
13587
  case 8:
13580
13588
  return ts.escapeLeadingUnderscores(name.text);
13581
13589
  case 162:
13582
- var nameExpression = name.expression;
13590
+ var nameExpression = getComputedPropertyNameExpression(name);
13583
13591
  if (isStringOrNumericLiteralLike(nameExpression)) {
13584
13592
  return ts.escapeLeadingUnderscores(nameExpression.text);
13585
13593
  }
@@ -14324,10 +14332,10 @@ var ts;
14324
14332
  return ts.combinePaths(newDirPath, sourceFilePath);
14325
14333
  }
14326
14334
  ts.getSourceFilePathInNewDirWorker = getSourceFilePathInNewDirWorker;
14327
- function writeFile(host, diagnostics, fileName, data, writeByteOrderMark, sourceFiles) {
14328
- host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) {
14335
+ function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
14336
+ host.writeFile(fileName, text, writeByteOrderMark, function (hostErrorMessage) {
14329
14337
  diagnostics.add(createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));
14330
- }, sourceFiles);
14338
+ }, sourceFiles, data);
14331
14339
  }
14332
14340
  ts.writeFile = writeFile;
14333
14341
  function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) {
@@ -27596,7 +27604,7 @@ var ts;
27596
27604
  if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
27597
27605
  return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction), pos);
27598
27606
  }
27599
- return parseConditionalExpressionRest(expr, pos, disallowReturnTypeInArrowFunction);
27607
+ return parseConditionalExpressionRest(expr, pos);
27600
27608
  }
27601
27609
  function isYieldExpression() {
27602
27610
  if (token() === 125) {
@@ -27633,24 +27641,24 @@ var ts;
27633
27641
  return addJSDocComment(finishNode(node, pos));
27634
27642
  }
27635
27643
  function tryParseParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction) {
27636
- var triState = isParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction);
27644
+ var triState = isParenthesizedArrowFunctionExpression();
27637
27645
  if (triState === 0) {
27638
27646
  return undefined;
27639
27647
  }
27640
27648
  return triState === 1 ?
27641
- parseParenthesizedArrowFunctionExpression(true, disallowReturnTypeInArrowFunction) :
27649
+ parseParenthesizedArrowFunctionExpression(true, false) :
27642
27650
  tryParse(function () { return parsePossibleParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction); });
27643
27651
  }
27644
- function isParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction) {
27652
+ function isParenthesizedArrowFunctionExpression() {
27645
27653
  if (token() === 20 || token() === 29 || token() === 131) {
27646
- return lookAhead(function () { return isParenthesizedArrowFunctionExpressionWorker(disallowReturnTypeInArrowFunction); });
27654
+ return lookAhead(isParenthesizedArrowFunctionExpressionWorker);
27647
27655
  }
27648
27656
  if (token() === 38) {
27649
27657
  return 1;
27650
27658
  }
27651
27659
  return 0;
27652
27660
  }
27653
- function isParenthesizedArrowFunctionExpressionWorker(disallowReturnTypeInArrowFunction) {
27661
+ function isParenthesizedArrowFunctionExpressionWorker() {
27654
27662
  if (token() === 131) {
27655
27663
  nextToken();
27656
27664
  if (scanner.hasPrecedingLineBreak()) {
@@ -27666,12 +27674,8 @@ var ts;
27666
27674
  if (second === 21) {
27667
27675
  var third = nextToken();
27668
27676
  switch (third) {
27669
- case 58:
27670
- if (disallowReturnTypeInArrowFunction) {
27671
- return 0;
27672
- }
27673
- return 1;
27674
27677
  case 38:
27678
+ case 58:
27675
27679
  case 18:
27676
27680
  return 1;
27677
27681
  default:
@@ -27842,14 +27846,14 @@ var ts;
27842
27846
  topLevel = savedTopLevel;
27843
27847
  return node;
27844
27848
  }
27845
- function parseConditionalExpressionRest(leftOperand, pos, disallowReturnTypeInArrowFunction) {
27849
+ function parseConditionalExpressionRest(leftOperand, pos) {
27846
27850
  var questionToken = parseOptionalToken(57);
27847
27851
  if (!questionToken) {
27848
27852
  return leftOperand;
27849
27853
  }
27850
27854
  var colonToken;
27851
27855
  return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, function () { return parseAssignmentExpressionOrHigher(true); }), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
27852
- ? parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction)
27856
+ ? parseAssignmentExpressionOrHigher(true)
27853
27857
  : createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
27854
27858
  }
27855
27859
  function parseBinaryExpressionOrHigher(precedence) {
@@ -36341,7 +36345,7 @@ var ts;
36341
36345
  return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
36342
36346
  }
36343
36347
  if (name.kind === 162) {
36344
- var nameExpression = name.expression;
36348
+ var nameExpression = ts.getComputedPropertyNameExpression(name);
36345
36349
  if (ts.isStringOrNumericLiteralLike(nameExpression)) {
36346
36350
  return ts.escapeLeadingUnderscores(nameExpression.text);
36347
36351
  }
@@ -61320,6 +61324,7 @@ var ts;
61320
61324
  }
61321
61325
  }
61322
61326
  else {
61327
+ error(attributeDecl.expression, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
61323
61328
  typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType;
61324
61329
  }
61325
61330
  }
@@ -63210,6 +63215,7 @@ var ts;
63210
63215
  var args = getEffectiveCallArguments(node);
63211
63216
  var isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
63212
63217
  var argCheckMode = !isDecorator && !isSingleNonGenericCandidate && ts.some(args, isContextSensitive) ? 4 : 0;
63218
+ argCheckMode |= checkMode & 32;
63213
63219
  var candidatesForArgumentError;
63214
63220
  var candidateForArgumentArityError;
63215
63221
  var candidateForTypeArgumentError;
@@ -63380,7 +63386,7 @@ var ts;
63380
63386
  continue;
63381
63387
  }
63382
63388
  if (argCheckMode) {
63383
- argCheckMode = 0;
63389
+ argCheckMode = checkMode & 32;
63384
63390
  if (inferenceContext) {
63385
63391
  var typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext);
63386
63392
  checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, ts.isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters);
@@ -90217,6 +90223,7 @@ var ts;
90217
90223
  else {
90218
90224
  printer.writeFile(sourceFile, writer, sourceMapGenerator);
90219
90225
  }
90226
+ var sourceMapUrlPos;
90220
90227
  if (sourceMapGenerator) {
90221
90228
  if (sourceMapDataList) {
90222
90229
  sourceMapDataList.push({
@@ -90228,6 +90235,7 @@ var ts;
90228
90235
  if (sourceMappingURL) {
90229
90236
  if (!writer.isAtStartOfLine())
90230
90237
  writer.rawWrite(newLine);
90238
+ sourceMapUrlPos = writer.getTextPos();
90231
90239
  writer.writeComment("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
90232
90240
  }
90233
90241
  if (sourceMapFilePath) {
@@ -90238,7 +90246,7 @@ var ts;
90238
90246
  else {
90239
90247
  writer.writeLine();
90240
90248
  }
90241
- ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles);
90249
+ ts.writeFile(host, emitterDiagnostics, jsFilePath, writer.getText(), !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos: sourceMapUrlPos });
90242
90250
  writer.clear();
90243
90251
  }
90244
90252
  function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
@@ -90722,7 +90730,7 @@ var ts;
90722
90730
  setWriter(undefined, undefined);
90723
90731
  }
90724
90732
  function getCurrentLineMap() {
90725
- return currentLineMap || (currentLineMap = ts.getLineStarts(currentSourceFile));
90733
+ return currentLineMap || (currentLineMap = ts.getLineStarts(ts.Debug.checkDefined(currentSourceFile)));
90726
90734
  }
90727
90735
  function emit(node, parenthesizerRule) {
90728
90736
  if (node === undefined)
@@ -91806,7 +91814,7 @@ var ts;
91806
91814
  increaseIndent();
91807
91815
  }
91808
91816
  var preferNewLine = node.multiLine ? 65536 : 0;
91809
- var allowTrailingComma = currentSourceFile.languageVersion >= 1 && !ts.isJsonSourceFile(currentSourceFile) ? 64 : 0;
91817
+ var allowTrailingComma = currentSourceFile && currentSourceFile.languageVersion >= 1 && !ts.isJsonSourceFile(currentSourceFile) ? 64 : 0;
91810
91818
  emitList(node, node.properties, 526226 | allowTrailingComma | preferNewLine);
91811
91819
  if (indentedFlag) {
91812
91820
  decreaseIndent();
@@ -92133,7 +92141,7 @@ var ts;
92133
92141
  }
92134
92142
  function emitExpressionStatement(node) {
92135
92143
  emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfExpressionStatement);
92136
- if (!ts.isJsonSourceFile(currentSourceFile) || ts.nodeIsSynthesized(node.expression)) {
92144
+ if (!currentSourceFile || !ts.isJsonSourceFile(currentSourceFile) || ts.nodeIsSynthesized(node.expression)) {
92137
92145
  writeTrailingSemicolon();
92138
92146
  }
92139
92147
  }
@@ -92412,7 +92420,7 @@ var ts;
92412
92420
  if (body.multiLine) {
92413
92421
  return false;
92414
92422
  }
92415
- if (!ts.nodeIsSynthesized(body) && !ts.rangeIsOnSingleLine(body, currentSourceFile)) {
92423
+ if (!ts.nodeIsSynthesized(body) && currentSourceFile && !ts.rangeIsOnSingleLine(body, currentSourceFile)) {
92416
92424
  return false;
92417
92425
  }
92418
92426
  if (getLeadingLineTerminatorCount(body, body.statements, 2)
@@ -92437,12 +92445,7 @@ var ts;
92437
92445
  var emitBlockFunctionBody = shouldEmitBlockFunctionBodyOnSingleLine(body)
92438
92446
  ? emitBlockFunctionBodyOnSingleLine
92439
92447
  : emitBlockFunctionBodyWorker;
92440
- if (emitBodyWithDetachedComments) {
92441
- emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
92442
- }
92443
- else {
92444
- emitBlockFunctionBody(body);
92445
- }
92448
+ emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody);
92446
92449
  decreaseIndent();
92447
92450
  writeToken(19, body.statements.end, writePunctuation, body);
92448
92451
  onAfterEmitNode === null || onAfterEmitNode === void 0 ? void 0 : onAfterEmitNode(body);
@@ -92826,7 +92829,8 @@ var ts;
92826
92829
  }
92827
92830
  function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) {
92828
92831
  var emitAsSingleStatement = statements.length === 1 &&
92829
- (ts.nodeIsSynthesized(parentNode) ||
92832
+ (!currentSourceFile ||
92833
+ ts.nodeIsSynthesized(parentNode) ||
92830
92834
  ts.nodeIsSynthesized(statements[0]) ||
92831
92835
  ts.rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile));
92832
92836
  var format = 163969;
@@ -93038,14 +93042,12 @@ var ts;
93038
93042
  function emitSourceFile(node) {
93039
93043
  writeLine();
93040
93044
  var statements = node.statements;
93041
- if (emitBodyWithDetachedComments) {
93042
- var shouldEmitDetachedComment = statements.length === 0 ||
93043
- !ts.isPrologueDirective(statements[0]) ||
93044
- ts.nodeIsSynthesized(statements[0]);
93045
- if (shouldEmitDetachedComment) {
93046
- emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
93047
- return;
93048
- }
93045
+ var shouldEmitDetachedComment = statements.length === 0 ||
93046
+ !ts.isPrologueDirective(statements[0]) ||
93047
+ ts.nodeIsSynthesized(statements[0]);
93048
+ if (shouldEmitDetachedComment) {
93049
+ emitBodyWithDetachedComments(node, statements, emitSourceFileWorker);
93050
+ return;
93049
93051
  }
93050
93052
  emitSourceFileWorker(node);
93051
93053
  }
@@ -93423,7 +93425,7 @@ var ts;
93423
93425
  onBeforeEmitNodeArray(children);
93424
93426
  }
93425
93427
  if (isEmpty) {
93426
- if (format & 1 && !(preserveSourceNewlines && (!parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile)))) {
93428
+ if (format & 1 && !(preserveSourceNewlines && (!parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile)))) {
93427
93429
  writeLine();
93428
93430
  }
93429
93431
  else if (format & 256 && !(format & 524288)) {
@@ -93654,7 +93656,7 @@ var ts;
93654
93656
  }
93655
93657
  var firstChild_1 = children[0];
93656
93658
  if (firstChild_1 === undefined) {
93657
- return !parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
93659
+ return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
93658
93660
  }
93659
93661
  if (firstChild_1.pos === nextListElementPos) {
93660
93662
  return 0;
@@ -93662,7 +93664,7 @@ var ts;
93662
93664
  if (firstChild_1.kind === 11) {
93663
93665
  return 0;
93664
93666
  }
93665
- if (parentNode &&
93667
+ if (currentSourceFile && parentNode &&
93666
93668
  !ts.positionIsSynthesized(parentNode.pos) &&
93667
93669
  !ts.nodeIsSynthesized(firstChild_1) &&
93668
93670
  (!firstChild_1.parent || ts.getOriginalNode(firstChild_1.parent) === ts.getOriginalNode(parentNode))) {
@@ -93685,7 +93687,7 @@ var ts;
93685
93687
  if (nextNode.kind === 11) {
93686
93688
  return 0;
93687
93689
  }
93688
- else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
93690
+ else if (currentSourceFile && !ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
93689
93691
  if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
93690
93692
  return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
93691
93693
  }
@@ -93710,9 +93712,9 @@ var ts;
93710
93712
  }
93711
93713
  var lastChild = ts.lastOrUndefined(children);
93712
93714
  if (lastChild === undefined) {
93713
- return !parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
93715
+ return !parentNode || currentSourceFile && ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
93714
93716
  }
93715
- if (parentNode && !ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
93717
+ if (currentSourceFile && parentNode && !ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
93716
93718
  if (preserveSourceNewlines) {
93717
93719
  var end_1 = ts.isNodeArray(children) && !ts.positionIsSynthesized(children.end) ? children.end : lastChild.end;
93718
93720
  return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndNextNonWhitespaceCharacter(end_1, parentNode.end, currentSourceFile, includeComments); });
@@ -93769,7 +93771,7 @@ var ts;
93769
93771
  if (ts.getStartsOnNewLine(node2)) {
93770
93772
  return 1;
93771
93773
  }
93772
- if (!ts.nodeIsSynthesized(parent) && !ts.nodeIsSynthesized(node1) && !ts.nodeIsSynthesized(node2)) {
93774
+ if (currentSourceFile && !ts.nodeIsSynthesized(parent) && !ts.nodeIsSynthesized(node1) && !ts.nodeIsSynthesized(node2)) {
93773
93775
  if (preserveSourceNewlines) {
93774
93776
  return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(node1, node2, currentSourceFile, includeComments); });
93775
93777
  }
@@ -93779,7 +93781,7 @@ var ts;
93779
93781
  }
93780
93782
  function isEmptyBlock(block) {
93781
93783
  return block.statements.length === 0
93782
- && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
93784
+ && (!currentSourceFile || ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile));
93783
93785
  }
93784
93786
  function skipSynthesizedParentheses(node) {
93785
93787
  while (node.kind === 212 && ts.nodeIsSynthesized(node)) {
@@ -93791,16 +93793,23 @@ var ts;
93791
93793
  if (ts.isGeneratedIdentifier(node)) {
93792
93794
  return generateName(node);
93793
93795
  }
93794
- else if ((ts.isIdentifier(node) || ts.isPrivateIdentifier(node)) && (ts.nodeIsSynthesized(node) || !node.parent || !currentSourceFile || (node.parent && currentSourceFile && ts.getSourceFileOfNode(node) !== ts.getOriginalNode(currentSourceFile)))) {
93795
- return ts.idText(node);
93796
- }
93797
- else if (node.kind === 10 && node.textSourceNode) {
93796
+ if (ts.isStringLiteral(node) && node.textSourceNode) {
93798
93797
  return getTextOfNode(node.textSourceNode, includeTrivia);
93799
93798
  }
93800
- else if (ts.isLiteralExpression(node) && (ts.nodeIsSynthesized(node) || !node.parent)) {
93801
- return node.text;
93799
+ var sourceFile = currentSourceFile;
93800
+ var canUseSourceFile = !!sourceFile && !!node.parent && !ts.nodeIsSynthesized(node);
93801
+ if (ts.isMemberName(node)) {
93802
+ if (!canUseSourceFile || ts.getSourceFileOfNode(node) !== ts.getOriginalNode(sourceFile)) {
93803
+ return ts.idText(node);
93804
+ }
93802
93805
  }
93803
- return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node, includeTrivia);
93806
+ else {
93807
+ ts.Debug.assertNode(node, ts.isLiteralExpression);
93808
+ if (!canUseSourceFile) {
93809
+ return node.text;
93810
+ }
93811
+ }
93812
+ return ts.getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia);
93804
93813
  }
93805
93814
  function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) {
93806
93815
  if (node.kind === 10 && node.textSourceNode) {
@@ -94291,7 +94300,7 @@ var ts;
94291
94300
  return true;
94292
94301
  }
94293
94302
  function emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) {
94294
- if (!shouldWriteComment(currentSourceFile.text, commentPos))
94303
+ if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos))
94295
94304
  return;
94296
94305
  if (!hasWrittenComment) {
94297
94306
  ts.emitNewLineBeforeLeadingCommentOfPosition(getCurrentLineMap(), writer, rangePos, commentPos);
@@ -94317,7 +94326,7 @@ var ts;
94317
94326
  forEachTrailingCommentToEmit(pos, emitTrailingComment);
94318
94327
  }
94319
94328
  function emitTrailingComment(commentPos, commentEnd, _kind, hasTrailingNewLine) {
94320
- if (!shouldWriteComment(currentSourceFile.text, commentPos))
94329
+ if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos))
94321
94330
  return;
94322
94331
  if (!writer.isAtStartOfLine()) {
94323
94332
  writer.writeSpace(" ");
@@ -94338,6 +94347,8 @@ var ts;
94338
94347
  exitComment();
94339
94348
  }
94340
94349
  function emitTrailingCommentOfPositionNoNewline(commentPos, commentEnd, kind) {
94350
+ if (!currentSourceFile)
94351
+ return;
94341
94352
  emitPos(commentPos);
94342
94353
  ts.writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);
94343
94354
  emitPos(commentEnd);
@@ -94346,6 +94357,8 @@ var ts;
94346
94357
  }
94347
94358
  }
94348
94359
  function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) {
94360
+ if (!currentSourceFile)
94361
+ return;
94349
94362
  emitPos(commentPos);
94350
94363
  ts.writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine);
94351
94364
  emitPos(commentEnd);
@@ -94375,6 +94388,8 @@ var ts;
94375
94388
  return detachedCommentsInfo !== undefined && ts.last(detachedCommentsInfo).nodePos === pos;
94376
94389
  }
94377
94390
  function forEachLeadingCommentWithoutDetachedComments(cb) {
94391
+ if (!currentSourceFile)
94392
+ return;
94378
94393
  var pos = ts.last(detachedCommentsInfo).detachedCommentEndPos;
94379
94394
  if (detachedCommentsInfo.length - 1) {
94380
94395
  detachedCommentsInfo.pop();
@@ -94385,7 +94400,7 @@ var ts;
94385
94400
  ts.forEachLeadingCommentRange(currentSourceFile.text, pos, cb, pos);
94386
94401
  }
94387
94402
  function emitDetachedCommentsAndUpdateCommentsInfo(range) {
94388
- var currentDetachedCommentInfo = ts.emitDetachedComments(currentSourceFile.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled);
94403
+ var currentDetachedCommentInfo = currentSourceFile && ts.emitDetachedComments(currentSourceFile.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled);
94389
94404
  if (currentDetachedCommentInfo) {
94390
94405
  if (detachedCommentsInfo) {
94391
94406
  detachedCommentsInfo.push(currentDetachedCommentInfo);
@@ -94396,14 +94411,14 @@ var ts;
94396
94411
  }
94397
94412
  }
94398
94413
  function emitComment(text, lineMap, writer, commentPos, commentEnd, newLine) {
94399
- if (!shouldWriteComment(currentSourceFile.text, commentPos))
94414
+ if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos))
94400
94415
  return;
94401
94416
  emitPos(commentPos);
94402
94417
  ts.writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine);
94403
94418
  emitPos(commentEnd);
94404
94419
  }
94405
94420
  function isTripleSlashComment(commentPos, commentEnd) {
94406
- return ts.isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd);
94421
+ return !!currentSourceFile && ts.isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd);
94407
94422
  }
94408
94423
  function getParsedSourceMap(node) {
94409
94424
  if (node.parsedSourceMap === undefined && node.sourceMapText !== undefined) {
@@ -95210,7 +95225,11 @@ var ts;
95210
95225
  return newValue;
95211
95226
  };
95212
95227
  if (originalWriteFile) {
95213
- host.writeFile = function (fileName, data, writeByteOrderMark, onError, sourceFiles) {
95228
+ host.writeFile = function (fileName, data) {
95229
+ var rest = [];
95230
+ for (var _i = 2; _i < arguments.length; _i++) {
95231
+ rest[_i - 2] = arguments[_i];
95232
+ }
95214
95233
  var key = toPath(fileName);
95215
95234
  fileExistsCache.delete(key);
95216
95235
  var value = readFileCache.get(key);
@@ -95224,7 +95243,7 @@ var ts;
95224
95243
  sourceFileCache.delete(key);
95225
95244
  }
95226
95245
  }
95227
- originalWriteFile.call(host, fileName, data, writeByteOrderMark, onError, sourceFiles);
95246
+ originalWriteFile.call.apply(originalWriteFile, __spreadArray([host, fileName, data], rest, false));
95228
95247
  };
95229
95248
  }
95230
95249
  if (originalDirectoryExists && originalCreateDirectory) {
@@ -96046,6 +96065,7 @@ var ts;
96046
96065
  useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
96047
96066
  getFileIncludeReasons: function () { return fileReasons; },
96048
96067
  structureIsReused: structureIsReused,
96068
+ writeFile: writeFile,
96049
96069
  };
96050
96070
  onProgramCreateComplete();
96051
96071
  fileProcessingDiagnostics === null || fileProcessingDiagnostics === void 0 ? void 0 : fileProcessingDiagnostics.forEach(function (diagnostic) {
@@ -96449,7 +96469,7 @@ var ts;
96449
96469
  getProjectReferenceRedirect: getProjectReferenceRedirect,
96450
96470
  isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect,
96451
96471
  getSymlinkCache: getSymlinkCache,
96452
- writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError, sourceFiles) { return host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles); }),
96472
+ writeFile: writeFileCallback || writeFile,
96453
96473
  isEmitBlocked: isEmitBlocked,
96454
96474
  readFile: function (f) { return host.readFile(f); },
96455
96475
  fileExists: function (f) {
@@ -96467,6 +96487,9 @@ var ts;
96467
96487
  getFileIncludeReasons: program.getFileIncludeReasons,
96468
96488
  };
96469
96489
  }
96490
+ function writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
96491
+ host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
96492
+ }
96470
96493
  function emitBuildInfo(writeFileCallback) {
96471
96494
  ts.Debug.assert(!ts.outFile(options));
96472
96495
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "emitBuildInfo", {}, true);
@@ -98644,6 +98667,7 @@ var ts;
98644
98667
  }
98645
98668
  }
98646
98669
  }
98670
+ BuilderState.updateExportedModules = updateExportedModules;
98647
98671
  function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
98648
98672
  var _a;
98649
98673
  if (exportedModulesMapCache) {
@@ -98970,29 +98994,30 @@ var ts;
98970
98994
  }
98971
98995
  return undefined;
98972
98996
  }
98997
+ function removeDiagnosticsOfLibraryFiles(state) {
98998
+ if (!state.cleanedDiagnosticsOfLibFiles) {
98999
+ state.cleanedDiagnosticsOfLibFiles = true;
99000
+ var program_1 = ts.Debug.checkDefined(state.program);
99001
+ var options_2 = program_1.getCompilerOptions();
99002
+ ts.forEach(program_1.getSourceFiles(), function (f) {
99003
+ return program_1.isSourceFileDefaultLibrary(f) &&
99004
+ !ts.skipTypeChecking(f, options_2, program_1) &&
99005
+ removeSemanticDiagnosticsOf(state, f.resolvedPath);
99006
+ });
99007
+ }
99008
+ }
98973
99009
  function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
98974
99010
  var _a;
98975
99011
  removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
98976
99012
  if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
98977
- if (!state.cleanedDiagnosticsOfLibFiles) {
98978
- state.cleanedDiagnosticsOfLibFiles = true;
98979
- var program_1 = ts.Debug.checkDefined(state.program);
98980
- var options_2 = program_1.getCompilerOptions();
98981
- ts.forEach(program_1.getSourceFiles(), function (f) {
98982
- return program_1.isSourceFileDefaultLibrary(f) &&
98983
- !ts.skipTypeChecking(f, options_2, program_1) &&
98984
- removeSemanticDiagnosticsOf(state, f.resolvedPath);
98985
- });
98986
- }
99013
+ removeDiagnosticsOfLibraryFiles(state);
98987
99014
  ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
98988
99015
  return;
98989
99016
  }
98990
- else {
98991
- ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
98992
- }
98993
- if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
98994
- forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host); });
98995
- }
99017
+ ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
99018
+ if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies)
99019
+ return;
99020
+ handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
98996
99021
  }
98997
99022
  function handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host) {
98998
99023
  removeSemanticDiagnosticsOf(state, path);
@@ -99020,11 +99045,32 @@ var ts;
99020
99045
  var oldSignature = ts.Debug.checkDefined(state.fileInfos.get(path)).signature;
99021
99046
  return newSignature !== oldSignature;
99022
99047
  }
99023
- function forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, fn) {
99024
- var _a, _b;
99025
- if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) {
99048
+ function forEachKeyOfExportedModulesMap(state, filePath, fn) {
99049
+ var keys = state.currentAffectedFilesExportedModulesMap.getKeys(filePath);
99050
+ var result = keys && ts.forEachKey(keys, fn);
99051
+ if (result)
99052
+ return result;
99053
+ keys = state.exportedModulesMap.getKeys(filePath);
99054
+ return keys && ts.forEachKey(keys, function (exportedFromPath) {
99055
+ var _a;
99056
+ return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
99057
+ !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) ?
99058
+ fn(exportedFromPath) :
99059
+ undefined;
99060
+ });
99061
+ }
99062
+ function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host) {
99063
+ var _a;
99064
+ if (!((_a = state.fileInfos.get(filePath)) === null || _a === void 0 ? void 0 : _a.affectsGlobalScope))
99065
+ return false;
99066
+ ts.BuilderState.getAllFilesExcludingDefaultLibraryFile(state, state.program, undefined)
99067
+ .forEach(function (file) { return handleDtsMayChangeOf(state, file.resolvedPath, cancellationToken, computeHash, host); });
99068
+ removeDiagnosticsOfLibraryFiles(state);
99069
+ return true;
99070
+ }
99071
+ function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
99072
+ if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath))
99026
99073
  return;
99027
- }
99028
99074
  if (!isChangedSignature(state, affectedFile.resolvedPath))
99029
99075
  return;
99030
99076
  if (state.compilerOptions.isolatedModules) {
@@ -99035,7 +99081,9 @@ var ts;
99035
99081
  var currentPath = queue.pop();
99036
99082
  if (!seenFileNamesMap.has(currentPath)) {
99037
99083
  seenFileNamesMap.set(currentPath, true);
99038
- fn(state, currentPath);
99084
+ if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken, computeHash, host))
99085
+ return;
99086
+ handleDtsMayChangeOf(state, currentPath, cancellationToken, computeHash, host);
99039
99087
  if (isChangedSignature(state, currentPath)) {
99040
99088
  var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath);
99041
99089
  queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
@@ -99045,42 +99093,31 @@ var ts;
99045
99093
  }
99046
99094
  ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
99047
99095
  var seenFileAndExportsOfFile = new ts.Set();
99048
- (_a = state.currentAffectedFilesExportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
99049
- return forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
99050
- });
99051
- (_b = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
99052
- var _a;
99053
- return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
99054
- !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
99055
- forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
99096
+ forEachKeyOfExportedModulesMap(state, affectedFile.resolvedPath, function (exportedFromPath) {
99097
+ if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, computeHash, host))
99098
+ return true;
99099
+ var references = state.referencedMap.getKeys(exportedFromPath);
99100
+ return references && ts.forEachKey(references, function (filePath) {
99101
+ return handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
99102
+ });
99056
99103
  });
99057
99104
  }
99058
- function forEachFilesReferencingPath(state, referencedPath, seenFileAndExportsOfFile, fn) {
99105
+ function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, computeHash, host) {
99059
99106
  var _a;
99060
- (_a = state.referencedMap.getKeys(referencedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (filePath) {
99061
- return forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn);
99062
- });
99063
- }
99064
- function forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn) {
99065
- var _a, _b, _c;
99066
- if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath)) {
99067
- return;
99068
- }
99069
- fn(state, filePath);
99107
+ if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath))
99108
+ return undefined;
99109
+ if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, computeHash, host))
99110
+ return true;
99111
+ handleDtsMayChangeOf(state, filePath, cancellationToken, computeHash, host);
99070
99112
  ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
99071
- (_a = state.currentAffectedFilesExportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
99072
- return forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
99113
+ forEachKeyOfExportedModulesMap(state, filePath, function (exportedFromPath) {
99114
+ return handleDtsMayChangeOfFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, cancellationToken, computeHash, host);
99073
99115
  });
99074
- (_b = state.exportedModulesMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
99075
- var _a;
99076
- return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
99077
- !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
99078
- forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
99079
- });
99080
- (_c = state.referencedMap.getKeys(filePath)) === null || _c === void 0 ? void 0 : _c.forEach(function (referencingFilePath) {
99116
+ (_a = state.referencedMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (referencingFilePath) {
99081
99117
  return !seenFileAndExportsOfFile.has(referencingFilePath) &&
99082
- fn(state, referencingFilePath);
99118
+ handleDtsMayChangeOf(state, referencingFilePath, cancellationToken, computeHash, host);
99083
99119
  });
99120
+ return undefined;
99084
99121
  }
99085
99122
  function doneWithAffectedFile(state, affected, emitKind, isPendingEmit, isBuildInfoEmit) {
99086
99123
  if (isBuildInfoEmit) {
@@ -99402,7 +99439,43 @@ var ts;
99402
99439
  affected = program;
99403
99440
  }
99404
99441
  }
99405
- return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
99442
+ return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, affected !== state.program && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
99443
+ getWriteFileUpdatingSignatureCallback(writeFile) :
99444
+ writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
99445
+ }
99446
+ function getWriteFileUpdatingSignatureCallback(writeFile) {
99447
+ return function (fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
99448
+ var _a;
99449
+ if (ts.isDeclarationFileName(fileName)) {
99450
+ ts.Debug.assert((sourceFiles === null || sourceFiles === void 0 ? void 0 : sourceFiles.length) === 1);
99451
+ var file = sourceFiles[0];
99452
+ var info = state.fileInfos.get(file.resolvedPath);
99453
+ var signature = ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.get(file.resolvedPath)) || info.signature;
99454
+ if (signature === file.version) {
99455
+ var newSignature = (computeHash || ts.generateDjb2Hash)((data === null || data === void 0 ? void 0 : data.sourceMapUrlPos) !== undefined ? text.substring(0, data.sourceMapUrlPos) : text);
99456
+ if (newSignature !== file.version) {
99457
+ if (host.storeFilesChangingSignatureDuringEmit)
99458
+ (state.filesChangingSignature || (state.filesChangingSignature = new ts.Set())).add(file.resolvedPath);
99459
+ if (state.exportedModulesMap)
99460
+ ts.BuilderState.updateExportedModules(file, file.exportedModulesFromDeclarationEmit, state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap()));
99461
+ if (state.affectedFiles && state.affectedFilesIndex < state.affectedFiles.length) {
99462
+ state.currentAffectedFilesSignatures.set(file.resolvedPath, newSignature);
99463
+ }
99464
+ else {
99465
+ info.signature = newSignature;
99466
+ if (state.exportedModulesMap)
99467
+ ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
99468
+ }
99469
+ }
99470
+ }
99471
+ }
99472
+ if (writeFile)
99473
+ writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
99474
+ else if (host.writeFile)
99475
+ host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
99476
+ else
99477
+ state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
99478
+ };
99406
99479
  }
99407
99480
  function emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
99408
99481
  var _a;
@@ -99443,7 +99516,9 @@ var ts;
99443
99516
  }
99444
99517
  }
99445
99518
  }
99446
- return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
99519
+ return ts.Debug.checkDefined(state.program).emit(targetSourceFile, !ts.outFile(state.compilerOptions) && ts.getEmitDeclarations(state.compilerOptions) && !customTransformers ?
99520
+ getWriteFileUpdatingSignatureCallback(writeFile) :
99521
+ writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
99447
99522
  }
99448
99523
  function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
99449
99524
  while (true) {
@@ -101366,6 +101441,7 @@ var ts;
101366
101441
  createHash: ts.maybeBind(host, host.createHash),
101367
101442
  readDirectory: ts.maybeBind(host, host.readDirectory),
101368
101443
  disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
101444
+ storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
101369
101445
  };
101370
101446
  function writeFile(fileName, text, writeByteOrderMark, onError) {
101371
101447
  try {
@@ -101419,6 +101495,7 @@ var ts;
101419
101495
  createHash: ts.maybeBind(system, system.createHash),
101420
101496
  createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
101421
101497
  disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
101498
+ storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit,
101422
101499
  };
101423
101500
  }
101424
101501
  ts.createProgramHost = createProgramHost;
@@ -101495,6 +101572,7 @@ var ts;
101495
101572
  var host = ts.createCompilerHostWorker(options, undefined, system);
101496
101573
  host.createHash = ts.maybeBind(system, system.createHash);
101497
101574
  host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
101575
+ host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
101498
101576
  ts.setGetSourceFileAsHashVersioned(host, system);
101499
101577
  ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
101500
101578
  return host;