@typescript-deploys/pr-build 5.2.0-pr-52899-13 → 5.2.0-pr-54656-5

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.
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230621`;
38
+ version = `${versionMajorMinor}.0-insiders.20230622`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6237,7 +6237,7 @@ ${lanes.join("\n")}
6237
6237
  disableCPUProfiler,
6238
6238
  cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
6239
6239
  realpath,
6240
- debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
6240
+ debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
6241
6241
  tryEnableSourceMapsForHost() {
6242
6242
  try {
6243
6243
  require("source-map-support").install();
@@ -9035,7 +9035,6 @@ ${lanes.join("\n")}
9035
9035
  Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"),
9036
9036
  Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."),
9037
9037
  Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."),
9038
- Add_missing_comma_for_an_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_an_object_member_completion_0_95187", "Add missing comma for an object member completion '{0}'."),
9039
9038
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
9040
9039
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
9041
9040
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -155330,7 +155329,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155330
155329
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
155331
155330
  }
155332
155331
  function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) {
155333
- var _a, _b, _c;
155334
155332
  let insertText;
155335
155333
  let filterText;
155336
155334
  let replacementSpan = getReplacementSpanForContextToken(replacementToken);
@@ -155389,10 +155387,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155389
155387
  if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) {
155390
155388
  hasAction = true;
155391
155389
  }
155392
- if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */ && ((_b = findNextToken(contextToken, contextToken.parent, sourceFile)) == null ? void 0 : _b.kind) !== 28 /* CommaToken */ && (((_c = findAncestor(contextToken.parent, (node) => isPropertyAssignment(node))) == null ? void 0 : _c.getLastToken()) === contextToken || isMethodDeclaration(contextToken.parent.parent))) {
155393
- source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */;
155394
- hasAction = true;
155395
- }
155396
155390
  if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
155397
155391
  let importAdder;
155398
155392
  const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
@@ -155956,7 +155950,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155956
155950
  }
155957
155951
  function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
155958
155952
  const start = timestamp();
155959
- const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
155953
+ const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
155960
155954
  const useSemicolons = probablyUsesSemicolons(sourceFile);
155961
155955
  const typeChecker = program.getTypeChecker();
155962
155956
  const uniques = /* @__PURE__ */ new Map();
@@ -156123,7 +156117,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156123
156117
  return firstDefined(symbols, (symbol, index) => {
156124
156118
  const origin = symbolToOriginInfoMap[index];
156125
156119
  const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
156126
- return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
156120
+ return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
156127
156121
  }) || { type: "none" };
156128
156122
  }
156129
156123
  function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) {
@@ -156268,21 +156262,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156268
156262
  Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias");
156269
156263
  return { codeActions: [codeAction2], sourceDisplay: void 0 };
156270
156264
  }
156271
- if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) {
156272
- const changes = ts_textChanges_exports.ChangeTracker.with(
156273
- { host, formatContext, preferences },
156274
- (tracker) => tracker.insertText(sourceFile, contextToken.end, ",")
156275
- );
156276
- if (changes) {
156277
- return {
156278
- sourceDisplay: void 0,
156279
- codeActions: [{
156280
- changes,
156281
- description: diagnosticToString([Diagnostics.Add_missing_comma_for_an_object_member_completion_0, name])
156282
- }]
156283
- };
156284
- }
156285
- }
156286
156265
  if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) {
156287
156266
  return { codeActions: void 0, sourceDisplay: void 0 };
156288
156267
  }
@@ -157676,22 +157655,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157676
157655
  return parent2;
157677
157656
  }
157678
157657
  break;
157679
- case 20 /* CloseBraceToken */:
157680
- if (parent2.parent && parent2.parent.parent && isMethodDeclaration(parent2.parent) && isObjectLiteralExpression(parent2.parent.parent)) {
157681
- return parent2.parent.parent;
157682
- }
157683
- break;
157684
157658
  case 42 /* AsteriskToken */:
157685
157659
  return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0;
157686
157660
  case 134 /* AsyncKeyword */:
157687
157661
  return tryCast(parent2.parent, isObjectLiteralExpression);
157688
157662
  case 80 /* Identifier */:
157689
157663
  return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0;
157690
- default:
157691
- const ancestorNode = findAncestor(parent2, (node) => isPropertyAssignment(node));
157692
- if (contextToken.kind !== 59 /* ColonToken */ && ancestorNode && ancestorNode.getLastToken() === contextToken && isObjectLiteralExpression(ancestorNode.parent)) {
157693
- return ancestorNode.parent;
157694
- }
157695
157664
  }
157696
157665
  }
157697
157666
  return void 0;
@@ -158145,11 +158114,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158145
158114
  return true;
158146
158115
  return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
158147
158116
  }
158148
- function getVariableOrParameterDeclaration(contextToken) {
158117
+ function getVariableOrParameterDeclaration(contextToken, location) {
158149
158118
  if (!contextToken)
158150
158119
  return;
158151
- const declaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node) || (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
158152
- return declaration;
158120
+ const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
158121
+ const possiblyVariableDeclaration = findAncestor(location, (node) => {
158122
+ return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node);
158123
+ });
158124
+ return possiblyParameterDeclaration || possiblyVariableDeclaration;
158153
158125
  }
158154
158126
  function isArrowFunctionBody(node) {
158155
158127
  return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
@@ -158233,7 +158205,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158233
158205
  CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/";
158234
158206
  CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
158235
158207
  CompletionSource2["SwitchCases"] = "SwitchCases/";
158236
- CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/";
158237
158208
  return CompletionSource2;
158238
158209
  })(CompletionSource || {});
158239
158210
  SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230621`;
38
+ version = `${versionMajorMinor}.0-insiders.20230622`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6237,7 +6237,7 @@ ${lanes.join("\n")}
6237
6237
  disableCPUProfiler,
6238
6238
  cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
6239
6239
  realpath,
6240
- debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
6240
+ debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
6241
6241
  tryEnableSourceMapsForHost() {
6242
6242
  try {
6243
6243
  require("source-map-support").install();
@@ -9035,7 +9035,6 @@ ${lanes.join("\n")}
9035
9035
  Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"),
9036
9036
  Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."),
9037
9037
  Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."),
9038
- Add_missing_comma_for_an_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_an_object_member_completion_0_95187", "Add missing comma for an object member completion '{0}'."),
9039
9038
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
9040
9039
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
9041
9040
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -155345,7 +155344,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155345
155344
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
155346
155345
  }
155347
155346
  function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) {
155348
- var _a, _b, _c;
155349
155347
  let insertText;
155350
155348
  let filterText;
155351
155349
  let replacementSpan = getReplacementSpanForContextToken(replacementToken);
@@ -155404,10 +155402,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155404
155402
  if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) {
155405
155403
  hasAction = true;
155406
155404
  }
155407
- if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */ && ((_b = findNextToken(contextToken, contextToken.parent, sourceFile)) == null ? void 0 : _b.kind) !== 28 /* CommaToken */ && (((_c = findAncestor(contextToken.parent, (node) => isPropertyAssignment(node))) == null ? void 0 : _c.getLastToken()) === contextToken || isMethodDeclaration(contextToken.parent.parent))) {
155408
- source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */;
155409
- hasAction = true;
155410
- }
155411
155405
  if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
155412
155406
  let importAdder;
155413
155407
  const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext);
@@ -155971,7 +155965,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
155971
155965
  }
155972
155966
  function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
155973
155967
  const start = timestamp();
155974
- const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken);
155968
+ const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location);
155975
155969
  const useSemicolons = probablyUsesSemicolons(sourceFile);
155976
155970
  const typeChecker = program.getTypeChecker();
155977
155971
  const uniques = /* @__PURE__ */ new Map();
@@ -156138,7 +156132,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156138
156132
  return firstDefined(symbols, (symbol, index) => {
156139
156133
  const origin = symbolToOriginInfoMap[index];
156140
156134
  const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
156141
- return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
156135
+ return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0;
156142
156136
  }) || { type: "none" };
156143
156137
  }
156144
156138
  function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) {
@@ -156283,21 +156277,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
156283
156277
  Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias");
156284
156278
  return { codeActions: [codeAction2], sourceDisplay: void 0 };
156285
156279
  }
156286
- if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) {
156287
- const changes = ts_textChanges_exports.ChangeTracker.with(
156288
- { host, formatContext, preferences },
156289
- (tracker) => tracker.insertText(sourceFile, contextToken.end, ",")
156290
- );
156291
- if (changes) {
156292
- return {
156293
- sourceDisplay: void 0,
156294
- codeActions: [{
156295
- changes,
156296
- description: diagnosticToString([Diagnostics.Add_missing_comma_for_an_object_member_completion_0, name])
156297
- }]
156298
- };
156299
- }
156300
- }
156301
156280
  if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) {
156302
156281
  return { codeActions: void 0, sourceDisplay: void 0 };
156303
156282
  }
@@ -157691,22 +157670,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
157691
157670
  return parent2;
157692
157671
  }
157693
157672
  break;
157694
- case 20 /* CloseBraceToken */:
157695
- if (parent2.parent && parent2.parent.parent && isMethodDeclaration(parent2.parent) && isObjectLiteralExpression(parent2.parent.parent)) {
157696
- return parent2.parent.parent;
157697
- }
157698
- break;
157699
157673
  case 42 /* AsteriskToken */:
157700
157674
  return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0;
157701
157675
  case 134 /* AsyncKeyword */:
157702
157676
  return tryCast(parent2.parent, isObjectLiteralExpression);
157703
157677
  case 80 /* Identifier */:
157704
157678
  return contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent) ? contextToken.parent.parent : void 0;
157705
- default:
157706
- const ancestorNode = findAncestor(parent2, (node) => isPropertyAssignment(node));
157707
- if (contextToken.kind !== 59 /* ColonToken */ && ancestorNode && ancestorNode.getLastToken() === contextToken && isObjectLiteralExpression(ancestorNode.parent)) {
157708
- return ancestorNode.parent;
157709
- }
157710
157679
  }
157711
157680
  }
157712
157681
  return void 0;
@@ -158160,11 +158129,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158160
158129
  return true;
158161
158130
  return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text);
158162
158131
  }
158163
- function getVariableOrParameterDeclaration(contextToken) {
158132
+ function getVariableOrParameterDeclaration(contextToken, location) {
158164
158133
  if (!contextToken)
158165
158134
  return;
158166
- const declaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node) || (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
158167
- return declaration;
158135
+ const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent));
158136
+ const possiblyVariableDeclaration = findAncestor(location, (node) => {
158137
+ return isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node);
158138
+ });
158139
+ return possiblyParameterDeclaration || possiblyVariableDeclaration;
158168
158140
  }
158169
158141
  function isArrowFunctionBody(node) {
158170
158142
  return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/;
@@ -158248,7 +158220,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158248
158220
  CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/";
158249
158221
  CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/";
158250
158222
  CompletionSource2["SwitchCases"] = "SwitchCases/";
158251
- CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/";
158252
158223
  return CompletionSource2;
158253
158224
  })(CompletionSource || {});
158254
158225
  SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => {
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-insiders.20230621`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230622`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -4367,7 +4367,7 @@ var sys = (() => {
4367
4367
  disableCPUProfiler,
4368
4368
  cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"),
4369
4369
  realpath,
4370
- debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)),
4370
+ debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay,
4371
4371
  tryEnableSourceMapsForHost() {
4372
4372
  try {
4373
4373
  require("source-map-support").install();
@@ -7106,7 +7106,6 @@ var Diagnostics = {
7106
7106
  Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"),
7107
7107
  Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."),
7108
7108
  Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."),
7109
- Add_missing_comma_for_an_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_an_object_member_completion_0_95187", "Add missing comma for an object member completion '{0}'."),
7110
7109
  No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* Error */, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
7111
7110
  Classes_may_not_have_a_field_named_constructor: diag(18006, 1 /* Error */, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
7112
7111
  JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, 1 /* Error */, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.2.0-pr-52899-13",
5
+ "version": "5.2.0-pr-54656-5",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -115,5 +115,5 @@
115
115
  "node": "20.1.0",
116
116
  "npm": "8.19.4"
117
117
  },
118
- "gitHead": "125466225f3ce8d2ae30073da465e3094a93247f"
118
+ "gitHead": "f665b3b7960812f0b868aaf0c6d95d240e6382a1"
119
119
  }