typescript 4.9.0-dev.20220822 → 4.9.0-dev.20220825

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.
@@ -108,7 +108,7 @@ var ts;
108
108
  // The following is baselined as a literal template type without intervention
109
109
  /** The version of the TypeScript compiler release */
110
110
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
111
- ts.version = ts.versionMajorMinor + ".0-dev.20220822";
111
+ ts.version = ts.versionMajorMinor + ".0-dev.20220825";
112
112
  /* @internal */
113
113
  var Comparison;
114
114
  (function (Comparison) {
@@ -129,7 +129,7 @@ var ts;
129
129
  function tryGetNativeMap() {
130
130
  // Internet Explorer's Map doesn't support iteration, so don't use it.
131
131
  var gMap = globals === null || globals === void 0 ? void 0 : globals.Map;
132
- // eslint-disable-next-line no-in-operator
132
+ // eslint-disable-next-line local/no-in-operator
133
133
  var constructor = typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
134
134
  if (!constructor) {
135
135
  throw new Error("No compatible Map implementation found.");
@@ -143,7 +143,7 @@ var ts;
143
143
  function tryGetNativeSet() {
144
144
  // Internet Explorer's Set doesn't support iteration, so don't use it.
145
145
  var gSet = globals === null || globals === void 0 ? void 0 : globals.Set;
146
- // eslint-disable-next-line no-in-operator
146
+ // eslint-disable-next-line local/no-in-operator
147
147
  var constructor = typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
148
148
  if (!constructor) {
149
149
  throw new Error("No compatible Set implementation found.");
@@ -2842,7 +2842,7 @@ var ts;
2842
2842
  Debug.formatControlFlowGraph = formatControlFlowGraph;
2843
2843
  var flowNodeProto;
2844
2844
  function attachFlowNodeDebugInfoWorker(flowNode) {
2845
- if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator
2845
+ if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line local/no-in-operator
2846
2846
  Object.defineProperties(flowNode, {
2847
2847
  // for use with vscode-js-debug's new customDescriptionGenerator in launch.json
2848
2848
  __tsDebuggerDisplay: {
@@ -2888,7 +2888,7 @@ var ts;
2888
2888
  Debug.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo;
2889
2889
  var nodeArrayProto;
2890
2890
  function attachNodeArrayDebugInfoWorker(array) {
2891
- if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line no-in-operator
2891
+ if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line local/no-in-operator
2892
2892
  Object.defineProperties(array, {
2893
2893
  __tsDebuggerDisplay: {
2894
2894
  value: function (defaultValue) {
@@ -4840,6 +4840,7 @@ var ts;
4840
4840
  NodeBuilderFlags[NodeBuilderFlags["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple";
4841
4841
  NodeBuilderFlags[NodeBuilderFlags["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType";
4842
4842
  NodeBuilderFlags[NodeBuilderFlags["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType";
4843
+ /* @internal */ NodeBuilderFlags[NodeBuilderFlags["WriteComputedProps"] = 1073741824] = "WriteComputedProps";
4843
4844
  // Errors (cont.)
4844
4845
  NodeBuilderFlags[NodeBuilderFlags["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths";
4845
4846
  /* @internal */ NodeBuilderFlags[NodeBuilderFlags["DoNotIncludeSymbolChain"] = 134217728] = "DoNotIncludeSymbolChain";
@@ -4900,8 +4901,10 @@ var ts;
4900
4901
  SymbolFormatFlags[SymbolFormatFlags["AllowAnyNodeKind"] = 4] = "AllowAnyNodeKind";
4901
4902
  // Prefer aliases which are not directly visible
4902
4903
  SymbolFormatFlags[SymbolFormatFlags["UseAliasDefinedOutsideCurrentScope"] = 8] = "UseAliasDefinedOutsideCurrentScope";
4904
+ // { [E.A]: 1 }
4905
+ /* @internal */ SymbolFormatFlags[SymbolFormatFlags["WriteComputedProps"] = 16] = "WriteComputedProps";
4903
4906
  // Skip building an accessible symbol chain
4904
- /* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] = 16] = "DoNotIncludeSymbolChain";
4907
+ /* @internal */ SymbolFormatFlags[SymbolFormatFlags["DoNotIncludeSymbolChain"] = 32] = "DoNotIncludeSymbolChain";
4905
4908
  })(SymbolFormatFlags = ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {}));
4906
4909
  /* @internal */
4907
4910
  var SymbolAccessibility;
@@ -30543,17 +30546,6 @@ var ts;
30543
30546
  || kind === 173 /* SetAccessor */;
30544
30547
  }
30545
30548
  ts.canHaveIllegalTypeParameters = canHaveIllegalTypeParameters;
30546
- function canHaveDecorators(node) {
30547
- var kind = node.kind;
30548
- return kind === 164 /* Parameter */
30549
- || kind === 167 /* PropertyDeclaration */
30550
- || kind === 169 /* MethodDeclaration */
30551
- || kind === 172 /* GetAccessor */
30552
- || kind === 173 /* SetAccessor */
30553
- || kind === 226 /* ClassExpression */
30554
- || kind === 257 /* ClassDeclaration */;
30555
- }
30556
- ts.canHaveDecorators = canHaveDecorators;
30557
30549
  function canHaveIllegalDecorators(node) {
30558
30550
  var kind = node.kind;
30559
30551
  return kind === 296 /* PropertyAssignment */
@@ -30575,35 +30567,6 @@ var ts;
30575
30567
  || kind === 271 /* ExportAssignment */;
30576
30568
  }
30577
30569
  ts.canHaveIllegalDecorators = canHaveIllegalDecorators;
30578
- function canHaveModifiers(node) {
30579
- var kind = node.kind;
30580
- return kind === 163 /* TypeParameter */
30581
- || kind === 164 /* Parameter */
30582
- || kind === 166 /* PropertySignature */
30583
- || kind === 167 /* PropertyDeclaration */
30584
- || kind === 168 /* MethodSignature */
30585
- || kind === 169 /* MethodDeclaration */
30586
- || kind === 171 /* Constructor */
30587
- || kind === 172 /* GetAccessor */
30588
- || kind === 173 /* SetAccessor */
30589
- || kind === 176 /* IndexSignature */
30590
- || kind === 180 /* ConstructorType */
30591
- || kind === 213 /* FunctionExpression */
30592
- || kind === 214 /* ArrowFunction */
30593
- || kind === 226 /* ClassExpression */
30594
- || kind === 237 /* VariableStatement */
30595
- || kind === 256 /* FunctionDeclaration */
30596
- || kind === 257 /* ClassDeclaration */
30597
- || kind === 258 /* InterfaceDeclaration */
30598
- || kind === 259 /* TypeAliasDeclaration */
30599
- || kind === 260 /* EnumDeclaration */
30600
- || kind === 261 /* ModuleDeclaration */
30601
- || kind === 265 /* ImportEqualsDeclaration */
30602
- || kind === 266 /* ImportDeclaration */
30603
- || kind === 271 /* ExportAssignment */
30604
- || kind === 272 /* ExportDeclaration */;
30605
- }
30606
- ts.canHaveModifiers = canHaveModifiers;
30607
30570
  function canHaveIllegalModifiers(node) {
30608
30571
  var kind = node.kind;
30609
30572
  return kind === 170 /* ClassStaticBlockDeclaration */
@@ -30892,6 +30855,46 @@ var ts;
30892
30855
  return location ? ts.setTextRangePosEnd(range, location.pos, location.end) : range;
30893
30856
  }
30894
30857
  ts.setTextRange = setTextRange;
30858
+ function canHaveModifiers(node) {
30859
+ var kind = node.kind;
30860
+ return kind === 163 /* TypeParameter */
30861
+ || kind === 164 /* Parameter */
30862
+ || kind === 166 /* PropertySignature */
30863
+ || kind === 167 /* PropertyDeclaration */
30864
+ || kind === 168 /* MethodSignature */
30865
+ || kind === 169 /* MethodDeclaration */
30866
+ || kind === 171 /* Constructor */
30867
+ || kind === 172 /* GetAccessor */
30868
+ || kind === 173 /* SetAccessor */
30869
+ || kind === 176 /* IndexSignature */
30870
+ || kind === 180 /* ConstructorType */
30871
+ || kind === 213 /* FunctionExpression */
30872
+ || kind === 214 /* ArrowFunction */
30873
+ || kind === 226 /* ClassExpression */
30874
+ || kind === 237 /* VariableStatement */
30875
+ || kind === 256 /* FunctionDeclaration */
30876
+ || kind === 257 /* ClassDeclaration */
30877
+ || kind === 258 /* InterfaceDeclaration */
30878
+ || kind === 259 /* TypeAliasDeclaration */
30879
+ || kind === 260 /* EnumDeclaration */
30880
+ || kind === 261 /* ModuleDeclaration */
30881
+ || kind === 265 /* ImportEqualsDeclaration */
30882
+ || kind === 266 /* ImportDeclaration */
30883
+ || kind === 271 /* ExportAssignment */
30884
+ || kind === 272 /* ExportDeclaration */;
30885
+ }
30886
+ ts.canHaveModifiers = canHaveModifiers;
30887
+ function canHaveDecorators(node) {
30888
+ var kind = node.kind;
30889
+ return kind === 164 /* Parameter */
30890
+ || kind === 167 /* PropertyDeclaration */
30891
+ || kind === 169 /* MethodDeclaration */
30892
+ || kind === 172 /* GetAccessor */
30893
+ || kind === 173 /* SetAccessor */
30894
+ || kind === 226 /* ClassExpression */
30895
+ || kind === 257 /* ClassDeclaration */;
30896
+ }
30897
+ ts.canHaveDecorators = canHaveDecorators;
30895
30898
  })(ts || (ts = {}));
30896
30899
  var ts;
30897
30900
  (function (ts) {
@@ -49059,6 +49062,7 @@ var ts;
49059
49062
  signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration,
49060
49063
  symbolToEntityName: nodeBuilder.symbolToEntityName,
49061
49064
  symbolToExpression: nodeBuilder.symbolToExpression,
49065
+ symbolToNode: nodeBuilder.symbolToNode,
49062
49066
  symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations,
49063
49067
  symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration,
49064
49068
  typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration,
@@ -49728,10 +49732,10 @@ var ts;
49728
49732
  }
49729
49733
  // Issue errors globally
49730
49734
  var file = ts.getSourceFileOfNode(location);
49731
- addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line no-in-operator
49735
+ addErrorOrSuggestion(isError, "message" in message ? ts.createFileDiagnostic(file, 0, 0, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForFileFromMessageChain(file, message)); // eslint-disable-line local/no-in-operator
49732
49736
  return;
49733
49737
  }
49734
- addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line no-in-operator
49738
+ addErrorOrSuggestion(isError, "message" in message ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3) : ts.createDiagnosticForNodeFromMessageChain(location, message)); // eslint-disable-line local/no-in-operator
49735
49739
  }
49736
49740
  function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, arg0, arg1, arg2, arg3) {
49737
49741
  var diagnostic = error(location, message, arg0, arg1, arg2, arg3);
@@ -51714,7 +51718,7 @@ var ts;
51714
51718
  }
51715
51719
  }
51716
51720
  function getFullyQualifiedName(symbol, containingLocation) {
51717
- return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined, 16 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */);
51721
+ return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, /*meaning*/ undefined, 32 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */);
51718
51722
  }
51719
51723
  function getContainingQualifiedNameNode(node) {
51720
51724
  while (ts.isQualifiedName(node.parent)) {
@@ -53029,10 +53033,13 @@ var ts;
53029
53033
  if (flags & 8 /* UseAliasDefinedOutsideCurrentScope */) {
53030
53034
  nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */;
53031
53035
  }
53032
- if (flags & 16 /* DoNotIncludeSymbolChain */) {
53036
+ if (flags & 32 /* DoNotIncludeSymbolChain */) {
53033
53037
  nodeFlags |= 134217728 /* DoNotIncludeSymbolChain */;
53034
53038
  }
53035
- var builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToExpression : nodeBuilder.symbolToEntityName;
53039
+ if (flags & 16 /* WriteComputedProps */) {
53040
+ nodeFlags |= 1073741824 /* WriteComputedProps */;
53041
+ }
53042
+ var builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName;
53036
53043
  return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
53037
53044
  function symbolToStringWorker(writer) {
53038
53045
  var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); // TODO: GH#18217
@@ -53132,7 +53139,25 @@ var ts;
53132
53139
  symbolTableToDeclarationStatements: function (symbolTable, enclosingDeclaration, flags, tracker, bundled) {
53133
53140
  return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolTableToDeclarationStatements(symbolTable, context, bundled); });
53134
53141
  },
53142
+ symbolToNode: function (symbol, meaning, enclosingDeclaration, flags, tracker) {
53143
+ return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolToNode(symbol, context, meaning); });
53144
+ },
53135
53145
  };
53146
+ function symbolToNode(symbol, context, meaning) {
53147
+ if (context.flags & 1073741824 /* WriteComputedProps */) {
53148
+ if (symbol.valueDeclaration) {
53149
+ var name = ts.getNameOfDeclaration(symbol.valueDeclaration);
53150
+ if (name && ts.isComputedPropertyName(name))
53151
+ return name;
53152
+ }
53153
+ var nameType = getSymbolLinks(symbol).nameType;
53154
+ if (nameType && nameType.flags & (1024 /* EnumLiteral */ | 8192 /* UniqueESSymbol */)) {
53155
+ context.enclosingDeclaration = nameType.symbol.valueDeclaration;
53156
+ return ts.factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning));
53157
+ }
53158
+ }
53159
+ return symbolToExpression(symbol, context, meaning);
53160
+ }
53136
53161
  function withContext(enclosingDeclaration, flags, tracker, cb) {
53137
53162
  var _a, _b;
53138
53163
  ts.Debug.assert(enclosingDeclaration === undefined || (enclosingDeclaration.flags & 8 /* Synthesized */) === 0);
@@ -65936,7 +65961,7 @@ var ts;
65936
65961
  return 0 /* False */;
65937
65962
  }
65938
65963
  }
65939
- var isPerformingCommonPropertyChecks = (relation !== comparableRelation || relation === comparableRelation && isLiteralType(source)) &&
65964
+ var isPerformingCommonPropertyChecks = (relation !== comparableRelation || !(source.flags & 1048576 /* Union */) && isLiteralType(source)) &&
65940
65965
  !(intersectionState & 2 /* Target */) &&
65941
65966
  source.flags & (131068 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source !== globalObjectType &&
65942
65967
  target.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target) &&
@@ -67315,7 +67340,7 @@ var ts;
67315
67340
  shouldSkipElaboration = true; // Retain top-level error for interface implementing issues, otherwise omit it
67316
67341
  }
67317
67342
  if (props.length === 1) {
67318
- var propName = symbolToString(unmatchedProperty);
67343
+ var propName = symbolToString(unmatchedProperty, /*enclosingDeclaration*/ undefined, 0 /* None */, 4 /* AllowAnyNodeKind */ | 16 /* WriteComputedProps */);
67319
67344
  reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
67320
67345
  if (ts.length(unmatchedProperty.declarations)) {
67321
67346
  associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
@@ -91358,7 +91383,7 @@ var ts;
91358
91383
  exit();
91359
91384
  return sourceIndex;
91360
91385
  }
91361
- /* eslint-disable boolean-trivia, no-null/no-null */
91386
+ /* eslint-disable local/boolean-trivia, no-null/no-null */
91362
91387
  function setSourceContent(sourceIndex, content) {
91363
91388
  enter();
91364
91389
  if (content !== null) {
@@ -91371,7 +91396,7 @@ var ts;
91371
91396
  }
91372
91397
  exit();
91373
91398
  }
91374
- /* eslint-enable boolean-trivia, no-null/no-null */
91399
+ /* eslint-enable local/boolean-trivia, no-null/no-null */
91375
91400
  function addName(name) {
91376
91401
  enter();
91377
91402
  if (!nameToNameIndexMap)
@@ -133046,7 +133071,7 @@ var ts;
133046
133071
  // defined in `ts.commentPragmas` would be excessive, but we can avoid
133047
133072
  // some obvious false positives (e.g. in XML-like doc comments) by
133048
133073
  // checking the element name.
133049
- // eslint-disable-next-line no-in-operator
133074
+ // eslint-disable-next-line local/no-in-operator
133050
133075
  if (!match[3] || !(match[3] in ts.commentPragmas)) {
133051
133076
  return false;
133052
133077
  }
@@ -133748,7 +133773,7 @@ var ts;
133748
133773
  // Get string literal completions from specialized signatures of the target
133749
133774
  // i.e. declare function f(a: 'A');
133750
133775
  // f("/*completion position*/")
133751
- return argumentInfo ? getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) : fromContextualType();
133776
+ return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType();
133752
133777
  }
133753
133778
  // falls through (is `require("")` or `require(""` or `import("")`)
133754
133779
  case 266 /* ImportDeclaration */:
@@ -133804,7 +133829,7 @@ var ts;
133804
133829
  isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
133805
133830
  return getStringLiteralTypes(type, uniques);
133806
133831
  });
133807
- return { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier };
133832
+ return ts.length(types) ? { kind: 2 /* Types */, types: types, isNewIdentifier: isNewIdentifier } : undefined;
133808
133833
  }
133809
133834
  function stringLiteralCompletionsFromProperties(type) {
133810
133835
  return type && {
@@ -140743,7 +140768,7 @@ var ts;
140743
140768
  }
140744
140769
  }
140745
140770
  function addReference(referenceLocation, relatedSymbol, state) {
140746
- var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line no-in-operator
140771
+ var _a = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }, kind = _a.kind, symbol = _a.symbol; // eslint-disable-line local/no-in-operator
140747
140772
  // if rename symbol from default export anonymous function, for example `export default function() {}`, we do not need to add reference
140748
140773
  if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 88 /* DefaultKeyword */) {
140749
140774
  return;
@@ -146529,11 +146554,11 @@ var ts;
146529
146554
  // not enough to put us in the substitution expression; we should consider ourselves part of
146530
146555
  // the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1).
146531
146556
  //
146532
- /* eslint-disable no-double-space */
146557
+ /* eslint-disable local/no-double-space */
146533
146558
  // Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # `
146534
146559
  // ^ ^ ^ ^ ^ ^ ^ ^ ^
146535
146560
  // Case: 1 1 3 2 1 3 2 2 1
146536
- /* eslint-enable no-double-space */
146561
+ /* eslint-enable local/no-double-space */
146537
146562
  ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node.");
146538
146563
  if (ts.isTemplateLiteralToken(node)) {
146539
146564
  if (ts.isInsideTemplateLiteral(node, position, sourceFile)) {
@@ -154554,7 +154579,7 @@ var ts;
154554
154579
  name = getMapEntryOrDefault(funcNode.name);
154555
154580
  }
154556
154581
  // return undefined argName when arg is null or undefined
154557
- // eslint-disable-next-line no-in-operator
154582
+ // eslint-disable-next-line local/no-in-operator
154558
154583
  if (!name || "identifier" in name && name.identifier.text === "undefined") {
154559
154584
  return undefined;
154560
154585
  }
@@ -157822,11 +157847,10 @@ var ts;
157822
157847
  return declaration && declaration.parent === node ? declaration : undefined;
157823
157848
  }
157824
157849
  function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) {
157825
- if (ts.isTransientSymbol(symbol) && symbol.nameType && symbol.nameType.flags & 8192 /* UniqueESSymbol */) {
157826
- var expression = checker.symbolToExpression(symbol.nameType.symbol, 111551 /* Value */, symbol.valueDeclaration, 1048576 /* AllowUniqueESSymbolType */);
157827
- if (expression) {
157828
- return ts.factory.createComputedPropertyName(expression);
157829
- }
157850
+ if (ts.isTransientSymbol(symbol)) {
157851
+ var prop = checker.symbolToNode(symbol, 111551 /* Value */, /*enclosingDeclaration*/ undefined, 1073741824 /* WriteComputedProps */);
157852
+ if (prop && ts.isComputedPropertyName(prop))
157853
+ return prop;
157830
157854
  }
157831
157855
  return ts.createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */);
157832
157856
  }
@@ -166740,7 +166764,7 @@ var ts;
166740
166764
  this.kind = kind;
166741
166765
  }
166742
166766
  NodeObject.prototype.assertHasRealPosition = function (message) {
166743
- // eslint-disable-next-line debug-assert
166767
+ // eslint-disable-next-line local/debug-assert
166744
166768
  ts.Debug.assert(!ts.positionIsSynthesized(this.pos) && !ts.positionIsSynthesized(this.end), message || "Node must have a real position for this operation");
166745
166769
  };
166746
166770
  NodeObject.prototype.getSourceFile = function () {
@@ -169784,7 +169808,7 @@ var debugObjectHost = (function () {
169784
169808
  return this;
169785
169809
  })();
169786
169810
  // We need to use 'null' to interface with the managed side.
169787
- /* eslint-disable no-in-operator */
169811
+ /* eslint-disable local/no-in-operator */
169788
169812
  /* @internal */
169789
169813
  var ts;
169790
169814
  (function (ts) {
@@ -170584,7 +170608,7 @@ var ts;
170584
170608
  }());
170585
170609
  ts.TypeScriptServicesFactory = TypeScriptServicesFactory;
170586
170610
  })(ts || (ts = {}));
170587
- /* eslint-enable no-in-operator */
170611
+ /* eslint-enable local/no-in-operator */
170588
170612
  // We polyfill `globalThis` here so re can reliably patch the global scope
170589
170613
  // in the contexts we want to in the same way across script and module formats
170590
170614
  /* eslint-enable no-var */
@@ -173225,7 +173249,7 @@ var ts;
173225
173249
  var newLS = pluginModule.create(info);
173226
173250
  for (var _i = 0, _a = Object.keys(this.languageService); _i < _a.length; _i++) {
173227
173251
  var k = _a[_i];
173228
- // eslint-disable-next-line no-in-operator
173252
+ // eslint-disable-next-line local/no-in-operator
173229
173253
  if (!(k in newLS)) {
173230
173254
  this.projectService.logger.info("Plugin activation warning: Missing proxied method " + k + " in created LS. Patching.");
173231
173255
  newLS[k] = this.languageService[k];
@@ -179629,9 +179653,9 @@ var ts;
179629
179653
  };
179630
179654
  Session.prototype.getFileAndLanguageServiceForSyntacticOperation = function (args) {
179631
179655
  // Since this is syntactic operation, there should always be project for the file
179632
- // we wouldnt have to ensure project but rather throw if we dont get project
179656
+ // throw if we dont get project
179633
179657
  var file = server.toNormalizedPath(args.file);
179634
- var project = this.getProject(args.projectFileName) || this.projectService.tryGetDefaultProjectForFile(file);
179658
+ var project = this.getProject(args.projectFileName) || this.projectService.ensureDefaultProjectForFile(file);
179635
179659
  if (!project) {
179636
179660
  return server.Errors.ThrowNoProject();
179637
179661
  }
@@ -182170,7 +182194,7 @@ var ts;
182170
182194
  if (typeof value === "number") {
182171
182195
  return ts.factory.createNumericLiteral(value);
182172
182196
  }
182173
- // eslint-disable-next-line no-in-operator
182197
+ // eslint-disable-next-line local/no-in-operator
182174
182198
  if (typeof value === "object" && "base10Value" in value) { // PseudoBigInt
182175
182199
  return ts.factory.createBigIntLiteral(value);
182176
182200
  }
@@ -4834,6 +4834,8 @@ declare namespace ts {
4834
4834
  }
4835
4835
  declare namespace ts {
4836
4836
  function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
4837
+ function canHaveModifiers(node: Node): node is HasModifiers;
4838
+ function canHaveDecorators(node: Node): node is HasDecorators;
4837
4839
  }
4838
4840
  declare namespace ts {
4839
4841
  /**