@typescript-deploys/pr-build 5.4.0-pr-56515-12 → 5.4.0-pr-56467-3

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.
@@ -47,12 +47,13 @@ declare namespace Intl {
47
47
  select(n: number): LDMLPluralRule;
48
48
  }
49
49
 
50
- const PluralRules: {
50
+ interface PluralRulesConstructor {
51
51
  new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
52
52
  (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
53
-
54
53
  supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
55
- };
54
+ }
55
+
56
+ const PluralRules: PluralRulesConstructor;
56
57
 
57
58
  // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
58
59
  type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
@@ -19,9 +19,11 @@ and limitations under the License.
19
19
  /// <reference lib="es2018.intl" />
20
20
  declare namespace Intl {
21
21
  /**
22
- * [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
22
+ * A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier).
23
23
  *
24
- * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
24
+ * For example: "fa", "es-MX", "zh-Hant-TW".
25
+ *
26
+ * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
25
27
  */
26
28
  type UnicodeBCP47LocaleIdentifier = string;
27
29
 
@@ -89,16 +91,9 @@ declare namespace Intl {
89
91
  type RelativeTimeFormatStyle = "long" | "short" | "narrow";
90
92
 
91
93
  /**
92
- * [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition.
94
+ * The locale or locales to use
93
95
  *
94
- * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
95
- */
96
- type BCP47LanguageTag = string;
97
-
98
- /**
99
- * The locale(s) to use
100
- *
101
- * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
96
+ * See [MDN - Intl - locales argument](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
102
97
  */
103
98
  type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
104
99
 
@@ -218,7 +213,7 @@ declare namespace Intl {
218
213
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
219
214
  */
220
215
  new (
221
- locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
216
+ locales?: LocalesArgument,
222
217
  options?: RelativeTimeFormatOptions,
223
218
  ): RelativeTimeFormat;
224
219
 
@@ -241,7 +236,7 @@ declare namespace Intl {
241
236
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
242
237
  */
243
238
  supportedLocalesOf(
244
- locales?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[],
239
+ locales?: LocalesArgument,
245
240
  options?: RelativeTimeFormatOptions,
246
241
  ): UnicodeBCP47LocaleIdentifier[];
247
242
  };
@@ -312,7 +307,7 @@ declare namespace Intl {
312
307
  /** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */
313
308
  minimize(): Locale;
314
309
  /** Returns the locale's full locale identifier string. */
315
- toString(): BCP47LanguageTag;
310
+ toString(): UnicodeBCP47LocaleIdentifier;
316
311
  }
317
312
 
318
313
  /**
@@ -330,7 +325,7 @@ declare namespace Intl {
330
325
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
331
326
  */
332
327
  const Locale: {
333
- new (tag: BCP47LanguageTag | Locale, options?: LocaleOptions): Locale;
328
+ new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale;
334
329
  };
335
330
 
336
331
  type DisplayNamesFallback =
@@ -424,6 +419,31 @@ declare namespace Intl {
424
419
  *
425
420
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
426
421
  */
427
- supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): BCP47LanguageTag[];
422
+ supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[];
428
423
  };
424
+
425
+ interface CollatorConstructor {
426
+ new (locales?: LocalesArgument, options?: CollatorOptions): Collator;
427
+ (locales?: LocalesArgument, options?: CollatorOptions): Collator;
428
+ supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[];
429
+ }
430
+
431
+ interface DateTimeFormatConstructor {
432
+ new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat;
433
+ (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat;
434
+ supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[];
435
+ }
436
+
437
+ interface NumberFormatConstructor {
438
+ new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat;
439
+ (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat;
440
+ supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[];
441
+ }
442
+
443
+ interface PluralRulesConstructor {
444
+ new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
445
+ (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
446
+
447
+ supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
448
+ }
429
449
  }
@@ -25,4 +25,18 @@ interface String {
25
25
  * @param regexp A variable name or string literal containing the regular expression pattern and flags.
26
26
  */
27
27
  matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>;
28
+
29
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
30
+ toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
31
+
32
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
33
+ toLocaleUpperCase(locales?: Intl.LocalesArgument): string;
34
+
35
+ /**
36
+ * Determines whether two strings are equivalent in the current or specified locale.
37
+ * @param that String to compare to target string
38
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
39
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
40
+ */
41
+ localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
28
42
  }
@@ -143,7 +143,7 @@ declare namespace Intl {
143
143
  *
144
144
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
145
145
  */
146
- new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
146
+ new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat;
147
147
 
148
148
  /**
149
149
  * Returns an array containing those of the provided locales that are
@@ -161,6 +161,6 @@ declare namespace Intl {
161
161
  *
162
162
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
163
163
  */
164
- supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<ListFormatOptions, "localeMatcher">): BCP47LanguageTag[];
164
+ supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
165
165
  };
166
166
  }
@@ -89,7 +89,7 @@ declare namespace Intl {
89
89
  *
90
90
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
91
91
  */
92
- new (locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: SegmenterOptions): Segmenter;
92
+ new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter;
93
93
 
94
94
  /**
95
95
  * Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
@@ -103,7 +103,7 @@ declare namespace Intl {
103
103
  *
104
104
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
105
105
  */
106
- supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
106
+ supportedLocalesOf(locales: LocalesArgument, options?: Pick<SegmenterOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
107
107
  };
108
108
 
109
109
  /**
package/lib/lib.es5.d.ts CHANGED
@@ -4418,11 +4418,14 @@ declare namespace Intl {
4418
4418
  compare(x: string, y: string): number;
4419
4419
  resolvedOptions(): ResolvedCollatorOptions;
4420
4420
  }
4421
- var Collator: {
4421
+
4422
+ interface CollatorConstructor {
4422
4423
  new (locales?: string | string[], options?: CollatorOptions): Collator;
4423
4424
  (locales?: string | string[], options?: CollatorOptions): Collator;
4424
4425
  supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
4425
- };
4426
+ }
4427
+
4428
+ var Collator: CollatorConstructor;
4426
4429
 
4427
4430
  interface NumberFormatOptions {
4428
4431
  localeMatcher?: string | undefined;
@@ -4454,12 +4457,15 @@ declare namespace Intl {
4454
4457
  format(value: number): string;
4455
4458
  resolvedOptions(): ResolvedNumberFormatOptions;
4456
4459
  }
4457
- var NumberFormat: {
4460
+
4461
+ interface NumberFormatConstructor {
4458
4462
  new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
4459
4463
  (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
4460
4464
  supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
4461
4465
  readonly prototype: NumberFormat;
4462
- };
4466
+ }
4467
+
4468
+ var NumberFormat: NumberFormatConstructor;
4463
4469
 
4464
4470
  interface DateTimeFormatOptions {
4465
4471
  localeMatcher?: "best fit" | "lookup" | undefined;
@@ -4498,12 +4504,15 @@ declare namespace Intl {
4498
4504
  format(date?: Date | number): string;
4499
4505
  resolvedOptions(): ResolvedDateTimeFormatOptions;
4500
4506
  }
4501
- var DateTimeFormat: {
4507
+
4508
+ interface DateTimeFormatConstructor {
4502
4509
  new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
4503
4510
  (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
4504
4511
  supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
4505
4512
  readonly prototype: DateTimeFormat;
4506
- };
4513
+ }
4514
+
4515
+ var DateTimeFormat: DateTimeFormatConstructor;
4507
4516
  }
4508
4517
 
4509
4518
  interface String {
@@ -20,3 +20,4 @@ and limitations under the License.
20
20
  /// <reference lib="esnext.intl" />
21
21
  /// <reference lib="esnext.decorators" />
22
22
  /// <reference lib="esnext.disposable" />
23
+ /// <reference lib="esnext.promise" />
@@ -0,0 +1,35 @@
1
+ /*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation. All rights reserved.
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4
+ this file except in compliance with the License. You may obtain a copy of the
5
+ License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+
12
+ See the Apache Version 2.0 License for specific language governing permissions
13
+ and limitations under the License.
14
+ ***************************************************************************** */
15
+
16
+
17
+ /// <reference no-default-lib="true"/>
18
+
19
+ interface PromiseWithResolvers<T> {
20
+ promise: Promise<T>;
21
+ resolve: (value: T | PromiseLike<T>) => void;
22
+ reject: (reason?: any) => void;
23
+ }
24
+
25
+ interface PromiseConstructor {
26
+ /**
27
+ * Creates a new Promise and returns it in an object, along with its resolve and reject functions.
28
+ * @returns An object with the properties `promise`, `resolve`, and `reject`.
29
+ *
30
+ * ```ts
31
+ * const { promise, resolve, reject } = Promise.withResolvers<T>();
32
+ * ```
33
+ */
34
+ withResolvers<T>(): PromiseWithResolvers<T>;
35
+ }
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.4";
21
- var version = `${versionMajorMinor}.0-insiders.20231128`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231129`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3671,7 +3671,6 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
3671
3671
  TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard";
3672
3672
  TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject";
3673
3673
  TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable";
3674
- TypeFlags2[TypeFlags2["IncludesConstrainedTypeVariable"] = 268435456 /* StringMapping */] = "IncludesConstrainedTypeVariable";
3675
3674
  TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion";
3676
3675
  return TypeFlags2;
3677
3676
  })(TypeFlags || {});
@@ -3718,7 +3717,6 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3718
3717
  ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
3719
3718
  ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
3720
3719
  ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
3721
- ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
3722
3720
  return ObjectFlags3;
3723
3721
  })(ObjectFlags || {});
3724
3722
  var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => {
@@ -32698,18 +32696,7 @@ var Parser;
32698
32696
  }
32699
32697
  nextTokenJSDoc();
32700
32698
  skipWhitespace();
32701
- const p2 = getNodePos();
32702
- let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
32703
- /*allowReservedWords*/
32704
- true
32705
- ) : void 0;
32706
- if (name) {
32707
- while (token() === 81 /* PrivateIdentifier */) {
32708
- reScanHashToken();
32709
- nextTokenJSDoc();
32710
- name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
32711
- }
32712
- }
32699
+ const name = parseJSDocLinkName();
32713
32700
  const text = [];
32714
32701
  while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
32715
32702
  text.push(scanner.getTokenText());
@@ -32718,6 +32705,26 @@ var Parser;
32718
32705
  const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
32719
32706
  return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
32720
32707
  }
32708
+ function parseJSDocLinkName() {
32709
+ if (tokenIsIdentifierOrKeyword(token())) {
32710
+ const pos = getNodePos();
32711
+ let name = parseIdentifierName();
32712
+ while (parseOptional(25 /* DotToken */)) {
32713
+ name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
32714
+ 80 /* Identifier */,
32715
+ /*reportAtCurrentPosition*/
32716
+ false
32717
+ ) : parseIdentifier()), pos);
32718
+ }
32719
+ while (token() === 81 /* PrivateIdentifier */) {
32720
+ reScanHashToken();
32721
+ nextTokenJSDoc();
32722
+ name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
32723
+ }
32724
+ return name;
32725
+ }
32726
+ return void 0;
32727
+ }
32721
32728
  function parseJSDocLinkPrefix() {
32722
32729
  skipWhitespaceOrAsterisk();
32723
32730
  if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
@@ -33890,7 +33897,7 @@ var libEntries = [
33890
33897
  ["esnext.disposable", "lib.esnext.disposable.d.ts"],
33891
33898
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
33892
33899
  ["esnext.string", "lib.es2022.string.d.ts"],
33893
- ["esnext.promise", "lib.es2021.promise.d.ts"],
33900
+ ["esnext.promise", "lib.esnext.promise.d.ts"],
33894
33901
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
33895
33902
  ["esnext.decorators", "lib.esnext.decorators.d.ts"],
33896
33903
  ["decorators", "lib.decorators.d.ts"],
@@ -41778,7 +41785,7 @@ function createBinder() {
41778
41785
  }
41779
41786
  function bindSpecialPropertyAssignment(node) {
41780
41787
  var _a;
41781
- const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, container) || lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer);
41788
+ const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer) || lookupSymbolForPropertyAccess(node.left.expression, container);
41782
41789
  if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) {
41783
41790
  return;
41784
41791
  }
@@ -41876,7 +41883,7 @@ function createBinder() {
41876
41883
  return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */;
41877
41884
  }
41878
41885
  function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
41879
- let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
41886
+ let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container);
41880
41887
  const isToplevel = isTopLevelNamespaceAssignment(propertyAccess);
41881
41888
  namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass);
41882
41889
  bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty);
@@ -56927,8 +56934,6 @@ function createTypeChecker(host) {
56927
56934
  includes |= flags & 473694207 /* IncludesMask */;
56928
56935
  if (flags & 465829888 /* Instantiable */)
56929
56936
  includes |= 33554432 /* IncludesInstantiable */;
56930
- if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */)
56931
- includes |= 268435456 /* IncludesConstrainedTypeVariable */;
56932
56937
  if (type === wildcardType)
56933
56938
  includes |= 8388608 /* IncludesWildcard */;
56934
56939
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
@@ -57033,41 +57038,6 @@ function createTypeChecker(host) {
57033
57038
  }
57034
57039
  }
57035
57040
  }
57036
- function removeConstrainedTypeVariables(types) {
57037
- const typeVariables = [];
57038
- for (const type of types) {
57039
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57040
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57041
- pushIfUnique(typeVariables, type.types[index]);
57042
- }
57043
- }
57044
- for (const typeVariable of typeVariables) {
57045
- const primitives = [];
57046
- for (const type of types) {
57047
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57048
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57049
- if (type.types[index] === typeVariable) {
57050
- insertType(primitives, type.types[1 - index]);
57051
- }
57052
- }
57053
- }
57054
- const constraint = getBaseConstraintOfType(typeVariable);
57055
- if (everyType(constraint, (t) => containsType(primitives, t))) {
57056
- let i = types.length;
57057
- while (i > 0) {
57058
- i--;
57059
- const type = types[i];
57060
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
57061
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57062
- if (type.types[index] === typeVariable && containsType(primitives, type.types[1 - index])) {
57063
- orderedRemoveItemAt(types, i);
57064
- }
57065
- }
57066
- }
57067
- insertType(types, typeVariable);
57068
- }
57069
- }
57070
- }
57071
57041
  function isNamedUnionType(type) {
57072
57042
  return !!(type.flags & 1048576 /* Union */ && (type.aliasSymbol || type.origin));
57073
57043
  }
@@ -57133,9 +57103,6 @@ function createTypeChecker(host) {
57133
57103
  if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) {
57134
57104
  removeStringLiteralsMatchedByTemplateLiterals(typeSet);
57135
57105
  }
57136
- if (includes & 268435456 /* IncludesConstrainedTypeVariable */) {
57137
- removeConstrainedTypeVariables(typeSet);
57138
- }
57139
57106
  if (unionReduction === 2 /* Subtype */) {
57140
57107
  typeSet = removeSubtypes(typeSet, !!(includes & 524288 /* Object */));
57141
57108
  if (!typeSet) {
@@ -57348,9 +57315,9 @@ function createTypeChecker(host) {
57348
57315
  types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */);
57349
57316
  return true;
57350
57317
  }
57351
- function createIntersectionType(types, objectFlags, aliasSymbol, aliasTypeArguments) {
57318
+ function createIntersectionType(types, aliasSymbol, aliasTypeArguments) {
57352
57319
  const result = createType(2097152 /* Intersection */);
57353
- result.objectFlags = objectFlags | getPropagatingFlagsOfTypes(
57320
+ result.objectFlags = getPropagatingFlagsOfTypes(
57354
57321
  types,
57355
57322
  /*excludeKinds*/
57356
57323
  98304 /* Nullable */
@@ -57364,7 +57331,6 @@ function createTypeChecker(host) {
57364
57331
  const typeMembershipMap = /* @__PURE__ */ new Map();
57365
57332
  const includes = addTypesToIntersection(typeMembershipMap, 0, types);
57366
57333
  const typeSet = arrayFrom(typeMembershipMap.values());
57367
- let objectFlags = 0 /* None */;
57368
57334
  if (includes & 131072 /* Never */) {
57369
57335
  return contains(typeSet, silentNeverType) ? silentNeverType : neverType;
57370
57336
  }
@@ -57393,25 +57359,6 @@ function createTypeChecker(host) {
57393
57359
  if (typeSet.length === 1) {
57394
57360
  return typeSet[0];
57395
57361
  }
57396
- if (typeSet.length === 2) {
57397
- const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
57398
- const typeVariable = typeSet[typeVarIndex];
57399
- const primitiveType = typeSet[1 - typeVarIndex];
57400
- if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || includes & 16777216 /* IncludesEmptyObject */)) {
57401
- const constraint = getBaseConstraintOfType(typeVariable);
57402
- if (constraint && everyType(constraint, (t) => !!(t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) || isEmptyAnonymousObjectType(t))) {
57403
- if (isTypeStrictSubtypeOf(constraint, primitiveType)) {
57404
- return typeVariable;
57405
- }
57406
- if (!(constraint.flags & 1048576 /* Union */ && someType(constraint, (c) => isTypeStrictSubtypeOf(c, primitiveType)))) {
57407
- if (!isTypeStrictSubtypeOf(primitiveType, constraint)) {
57408
- return neverType;
57409
- }
57410
- }
57411
- objectFlags = 67108864 /* IsConstrainedTypeVariable */;
57412
- }
57413
- }
57414
- }
57415
57362
  const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments);
57416
57363
  let result = intersectionTypes.get(id);
57417
57364
  if (!result) {
@@ -57434,7 +57381,7 @@ function createTypeChecker(host) {
57434
57381
  result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);
57435
57382
  }
57436
57383
  } else {
57437
- result = createIntersectionType(typeSet, objectFlags, aliasSymbol, aliasTypeArguments);
57384
+ result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
57438
57385
  }
57439
57386
  intersectionTypes.set(id, result);
57440
57387
  }
package/lib/tsserver.js CHANGED
@@ -545,6 +545,7 @@ __export(server_exports, {
545
545
  escapeNonAsciiString: () => escapeNonAsciiString,
546
546
  escapeSnippetText: () => escapeSnippetText,
547
547
  escapeString: () => escapeString,
548
+ escapeTemplateSubstitution: () => escapeTemplateSubstitution,
548
549
  every: () => every,
549
550
  expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
550
551
  explainFiles: () => explainFiles,
@@ -2331,7 +2332,7 @@ module.exports = __toCommonJS(server_exports);
2331
2332
 
2332
2333
  // src/compiler/corePublic.ts
2333
2334
  var versionMajorMinor = "5.4";
2334
- var version = `${versionMajorMinor}.0-insiders.20231128`;
2335
+ var version = `${versionMajorMinor}.0-insiders.20231129`;
2335
2336
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2336
2337
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2337
2338
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6685,7 +6686,6 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
6685
6686
  TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard";
6686
6687
  TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject";
6687
6688
  TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable";
6688
- TypeFlags2[TypeFlags2["IncludesConstrainedTypeVariable"] = 268435456 /* StringMapping */] = "IncludesConstrainedTypeVariable";
6689
6689
  TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion";
6690
6690
  return TypeFlags2;
6691
6691
  })(TypeFlags || {});
@@ -6732,7 +6732,6 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
6732
6732
  ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
6733
6733
  ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
6734
6734
  ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
6735
- ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
6736
6735
  return ObjectFlags3;
6737
6736
  })(ObjectFlags || {});
6738
6737
  var VarianceFlags = /* @__PURE__ */ ((VarianceFlags2) => {
@@ -37124,18 +37123,7 @@ var Parser;
37124
37123
  }
37125
37124
  nextTokenJSDoc();
37126
37125
  skipWhitespace();
37127
- const p2 = getNodePos();
37128
- let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
37129
- /*allowReservedWords*/
37130
- true
37131
- ) : void 0;
37132
- if (name) {
37133
- while (token() === 81 /* PrivateIdentifier */) {
37134
- reScanHashToken();
37135
- nextTokenJSDoc();
37136
- name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
37137
- }
37138
- }
37126
+ const name = parseJSDocLinkName();
37139
37127
  const text = [];
37140
37128
  while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
37141
37129
  text.push(scanner2.getTokenText());
@@ -37144,6 +37132,26 @@ var Parser;
37144
37132
  const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
37145
37133
  return finishNode(create(name, text.join("")), start3, scanner2.getTokenEnd());
37146
37134
  }
37135
+ function parseJSDocLinkName() {
37136
+ if (tokenIsIdentifierOrKeyword(token())) {
37137
+ const pos = getNodePos();
37138
+ let name = parseIdentifierName();
37139
+ while (parseOptional(25 /* DotToken */)) {
37140
+ name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
37141
+ 80 /* Identifier */,
37142
+ /*reportAtCurrentPosition*/
37143
+ false
37144
+ ) : parseIdentifier()), pos);
37145
+ }
37146
+ while (token() === 81 /* PrivateIdentifier */) {
37147
+ reScanHashToken();
37148
+ nextTokenJSDoc();
37149
+ name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
37150
+ }
37151
+ return name;
37152
+ }
37153
+ return void 0;
37154
+ }
37147
37155
  function parseJSDocLinkPrefix() {
37148
37156
  skipWhitespaceOrAsterisk();
37149
37157
  if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
@@ -38316,7 +38324,7 @@ var libEntries = [
38316
38324
  ["esnext.disposable", "lib.esnext.disposable.d.ts"],
38317
38325
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
38318
38326
  ["esnext.string", "lib.es2022.string.d.ts"],
38319
- ["esnext.promise", "lib.es2021.promise.d.ts"],
38327
+ ["esnext.promise", "lib.esnext.promise.d.ts"],
38320
38328
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
38321
38329
  ["esnext.decorators", "lib.esnext.decorators.d.ts"],
38322
38330
  ["decorators", "lib.decorators.d.ts"],
@@ -46459,7 +46467,7 @@ function createBinder() {
46459
46467
  }
46460
46468
  function bindSpecialPropertyAssignment(node) {
46461
46469
  var _a;
46462
- const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, container) || lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer);
46470
+ const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer) || lookupSymbolForPropertyAccess(node.left.expression, container);
46463
46471
  if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) {
46464
46472
  return;
46465
46473
  }
@@ -46557,7 +46565,7 @@ function createBinder() {
46557
46565
  return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */;
46558
46566
  }
46559
46567
  function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
46560
- let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
46568
+ let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container);
46561
46569
  const isToplevel = isTopLevelNamespaceAssignment(propertyAccess);
46562
46570
  namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass);
46563
46571
  bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty);
@@ -61653,8 +61661,6 @@ function createTypeChecker(host) {
61653
61661
  includes |= flags & 473694207 /* IncludesMask */;
61654
61662
  if (flags & 465829888 /* Instantiable */)
61655
61663
  includes |= 33554432 /* IncludesInstantiable */;
61656
- if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */)
61657
- includes |= 268435456 /* IncludesConstrainedTypeVariable */;
61658
61664
  if (type === wildcardType)
61659
61665
  includes |= 8388608 /* IncludesWildcard */;
61660
61666
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
@@ -61759,41 +61765,6 @@ function createTypeChecker(host) {
61759
61765
  }
61760
61766
  }
61761
61767
  }
61762
- function removeConstrainedTypeVariables(types) {
61763
- const typeVariables = [];
61764
- for (const type of types) {
61765
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
61766
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
61767
- pushIfUnique(typeVariables, type.types[index]);
61768
- }
61769
- }
61770
- for (const typeVariable of typeVariables) {
61771
- const primitives = [];
61772
- for (const type of types) {
61773
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
61774
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
61775
- if (type.types[index] === typeVariable) {
61776
- insertType(primitives, type.types[1 - index]);
61777
- }
61778
- }
61779
- }
61780
- const constraint = getBaseConstraintOfType(typeVariable);
61781
- if (everyType(constraint, (t) => containsType(primitives, t))) {
61782
- let i = types.length;
61783
- while (i > 0) {
61784
- i--;
61785
- const type = types[i];
61786
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
61787
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
61788
- if (type.types[index] === typeVariable && containsType(primitives, type.types[1 - index])) {
61789
- orderedRemoveItemAt(types, i);
61790
- }
61791
- }
61792
- }
61793
- insertType(types, typeVariable);
61794
- }
61795
- }
61796
- }
61797
61768
  function isNamedUnionType(type) {
61798
61769
  return !!(type.flags & 1048576 /* Union */ && (type.aliasSymbol || type.origin));
61799
61770
  }
@@ -61859,9 +61830,6 @@ function createTypeChecker(host) {
61859
61830
  if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) {
61860
61831
  removeStringLiteralsMatchedByTemplateLiterals(typeSet);
61861
61832
  }
61862
- if (includes & 268435456 /* IncludesConstrainedTypeVariable */) {
61863
- removeConstrainedTypeVariables(typeSet);
61864
- }
61865
61833
  if (unionReduction === 2 /* Subtype */) {
61866
61834
  typeSet = removeSubtypes(typeSet, !!(includes & 524288 /* Object */));
61867
61835
  if (!typeSet) {
@@ -62074,9 +62042,9 @@ function createTypeChecker(host) {
62074
62042
  types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */);
62075
62043
  return true;
62076
62044
  }
62077
- function createIntersectionType(types, objectFlags, aliasSymbol, aliasTypeArguments) {
62045
+ function createIntersectionType(types, aliasSymbol, aliasTypeArguments) {
62078
62046
  const result = createType(2097152 /* Intersection */);
62079
- result.objectFlags = objectFlags | getPropagatingFlagsOfTypes(
62047
+ result.objectFlags = getPropagatingFlagsOfTypes(
62080
62048
  types,
62081
62049
  /*excludeKinds*/
62082
62050
  98304 /* Nullable */
@@ -62090,7 +62058,6 @@ function createTypeChecker(host) {
62090
62058
  const typeMembershipMap = /* @__PURE__ */ new Map();
62091
62059
  const includes = addTypesToIntersection(typeMembershipMap, 0, types);
62092
62060
  const typeSet = arrayFrom(typeMembershipMap.values());
62093
- let objectFlags = 0 /* None */;
62094
62061
  if (includes & 131072 /* Never */) {
62095
62062
  return contains(typeSet, silentNeverType) ? silentNeverType : neverType;
62096
62063
  }
@@ -62119,25 +62086,6 @@ function createTypeChecker(host) {
62119
62086
  if (typeSet.length === 1) {
62120
62087
  return typeSet[0];
62121
62088
  }
62122
- if (typeSet.length === 2) {
62123
- const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
62124
- const typeVariable = typeSet[typeVarIndex];
62125
- const primitiveType = typeSet[1 - typeVarIndex];
62126
- if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || includes & 16777216 /* IncludesEmptyObject */)) {
62127
- const constraint = getBaseConstraintOfType(typeVariable);
62128
- if (constraint && everyType(constraint, (t) => !!(t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) || isEmptyAnonymousObjectType(t))) {
62129
- if (isTypeStrictSubtypeOf(constraint, primitiveType)) {
62130
- return typeVariable;
62131
- }
62132
- if (!(constraint.flags & 1048576 /* Union */ && someType(constraint, (c) => isTypeStrictSubtypeOf(c, primitiveType)))) {
62133
- if (!isTypeStrictSubtypeOf(primitiveType, constraint)) {
62134
- return neverType;
62135
- }
62136
- }
62137
- objectFlags = 67108864 /* IsConstrainedTypeVariable */;
62138
- }
62139
- }
62140
- }
62141
62089
  const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments);
62142
62090
  let result = intersectionTypes.get(id);
62143
62091
  if (!result) {
@@ -62160,7 +62108,7 @@ function createTypeChecker(host) {
62160
62108
  result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);
62161
62109
  }
62162
62110
  } else {
62163
- result = createIntersectionType(typeSet, objectFlags, aliasSymbol, aliasTypeArguments);
62111
+ result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
62164
62112
  }
62165
62113
  intersectionTypes.set(id, result);
62166
62114
  }
@@ -139282,11 +139230,9 @@ registerRefactor(refactorName3, {
139282
139230
  function getRangeToExtract(context, considerEmptySpans = true) {
139283
139231
  const { file, startPosition } = context;
139284
139232
  const isJS = isSourceFileJS(file);
139285
- const current = getTokenAtPosition(file, startPosition);
139286
139233
  const range = createTextRangeFromSpan(getRefactorContextSpan(context));
139287
- const cursorRequest = range.pos === range.end && considerEmptySpans;
139288
- const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end);
139289
- const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || overlappingRange));
139234
+ const isCursorRequest = range.pos === range.end && considerEmptySpans;
139235
+ const firstType = getFirstTypeAt(file, startPosition, range, isCursorRequest);
139290
139236
  if (!firstType || !isTypeNode(firstType))
139291
139237
  return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) };
139292
139238
  const checker = context.program.getTypeChecker();
@@ -139312,6 +139258,21 @@ function getRangeToExtract(context, considerEmptySpans = true) {
139312
139258
  const typeElements = flattenTypeLiteralNodeReference(checker, selection);
139313
139259
  return { isJS, selection, enclosingNode, typeParameters, typeElements };
139314
139260
  }
139261
+ function getFirstTypeAt(file, startPosition, range, isCursorRequest) {
139262
+ const currentNodes = [
139263
+ () => getTokenAtPosition(file, startPosition),
139264
+ () => getTouchingToken(file, startPosition, () => true)
139265
+ ];
139266
+ for (const f of currentNodes) {
139267
+ const current = f();
139268
+ const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end);
139269
+ const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (isCursorRequest || overlappingRange));
139270
+ if (firstType) {
139271
+ return firstType;
139272
+ }
139273
+ }
139274
+ return void 0;
139275
+ }
139315
139276
  function flattenTypeLiteralNodeReference(checker, selection) {
139316
139277
  if (!selection)
139317
139278
  return void 0;
@@ -165857,6 +165818,17 @@ function provideInlayHints(context) {
165857
165818
  visitForDisplayParts(node.type);
165858
165819
  }
165859
165820
  break;
165821
+ case 181 /* IndexSignature */:
165822
+ Debug.assertNode(node, isIndexSignatureDeclaration);
165823
+ Debug.assertEqual(node.parameters.length, 1);
165824
+ parts.push({ text: "[" });
165825
+ visitForDisplayParts(node.parameters[0]);
165826
+ parts.push({ text: "]" });
165827
+ if (node.type) {
165828
+ parts.push({ text: ": " });
165829
+ visitForDisplayParts(node.type);
165830
+ }
165831
+ break;
165860
165832
  case 173 /* MethodSignature */:
165861
165833
  Debug.assertNode(node, isMethodSignature);
165862
165834
  if ((_b = node.modifiers) == null ? void 0 : _b.length) {
@@ -165906,6 +165878,28 @@ function provideInlayHints(context) {
165906
165878
  parts.push({ text: tokenToString(node.operator) });
165907
165879
  visitForDisplayParts(node.operand);
165908
165880
  break;
165881
+ case 203 /* TemplateLiteralType */:
165882
+ Debug.assertNode(node, isTemplateLiteralTypeNode);
165883
+ visitForDisplayParts(node.head);
165884
+ node.templateSpans.forEach(visitForDisplayParts);
165885
+ break;
165886
+ case 16 /* TemplateHead */:
165887
+ Debug.assertNode(node, isTemplateHead);
165888
+ parts.push({ text: getLiteralText2(node) });
165889
+ break;
165890
+ case 204 /* TemplateLiteralTypeSpan */:
165891
+ Debug.assertNode(node, isTemplateLiteralTypeSpan);
165892
+ visitForDisplayParts(node.type);
165893
+ visitForDisplayParts(node.literal);
165894
+ break;
165895
+ case 17 /* TemplateMiddle */:
165896
+ Debug.assertNode(node, isTemplateMiddle);
165897
+ parts.push({ text: getLiteralText2(node) });
165898
+ break;
165899
+ case 18 /* TemplateTail */:
165900
+ Debug.assertNode(node, isTemplateTail);
165901
+ parts.push({ text: getLiteralText2(node) });
165902
+ break;
165909
165903
  case 197 /* ThisType */:
165910
165904
  Debug.assertNode(node, isThisTypeNode);
165911
165905
  parts.push({ text: "this" });
@@ -165933,8 +165927,22 @@ function provideInlayHints(context) {
165933
165927
  });
165934
165928
  }
165935
165929
  function getLiteralText2(node) {
165936
- if (isStringLiteral(node)) {
165937
- return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
165930
+ switch (node.kind) {
165931
+ case 11 /* StringLiteral */:
165932
+ return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
165933
+ case 16 /* TemplateHead */:
165934
+ case 17 /* TemplateMiddle */:
165935
+ case 18 /* TemplateTail */: {
165936
+ const rawText = node.rawText ?? escapeTemplateSubstitution(escapeString(node.text, 96 /* backtick */));
165937
+ switch (node.kind) {
165938
+ case 16 /* TemplateHead */:
165939
+ return "`" + rawText + "${";
165940
+ case 17 /* TemplateMiddle */:
165941
+ return "}" + rawText + "${";
165942
+ case 18 /* TemplateTail */:
165943
+ return "}" + rawText + "`";
165944
+ }
165945
+ }
165938
165946
  }
165939
165947
  return node.text;
165940
165948
  }
@@ -173499,6 +173507,7 @@ __export(ts_exports2, {
173499
173507
  escapeNonAsciiString: () => escapeNonAsciiString,
173500
173508
  escapeSnippetText: () => escapeSnippetText,
173501
173509
  escapeString: () => escapeString,
173510
+ escapeTemplateSubstitution: () => escapeTemplateSubstitution,
173502
173511
  every: () => every,
173503
173512
  expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
173504
173513
  explainFiles: () => explainFiles,
@@ -188290,6 +188299,7 @@ start(initializeNodeSystem(), require("os").platform());
188290
188299
  escapeNonAsciiString,
188291
188300
  escapeSnippetText,
188292
188301
  escapeString,
188302
+ escapeTemplateSubstitution,
188293
188303
  every,
188294
188304
  expandPreOrPostfixIncrementOrDecrementExpression,
188295
188305
  explainFiles,
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.4";
38
- version = `${versionMajorMinor}.0-insiders.20231128`;
38
+ version = `${versionMajorMinor}.0-insiders.20231129`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4447,7 +4447,6 @@ ${lanes.join("\n")}
4447
4447
  TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard";
4448
4448
  TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject";
4449
4449
  TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable";
4450
- TypeFlags2[TypeFlags2["IncludesConstrainedTypeVariable"] = 268435456 /* StringMapping */] = "IncludesConstrainedTypeVariable";
4451
4450
  TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion";
4452
4451
  return TypeFlags2;
4453
4452
  })(TypeFlags || {});
@@ -4494,7 +4493,6 @@ ${lanes.join("\n")}
4494
4493
  ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
4495
4494
  ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
4496
4495
  ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
4497
- ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
4498
4496
  return ObjectFlags3;
4499
4497
  })(ObjectFlags || {});
4500
4498
  VarianceFlags = /* @__PURE__ */ ((VarianceFlags2) => {
@@ -35193,18 +35191,7 @@ ${lanes.join("\n")}
35193
35191
  }
35194
35192
  nextTokenJSDoc();
35195
35193
  skipWhitespace();
35196
- const p2 = getNodePos();
35197
- let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
35198
- /*allowReservedWords*/
35199
- true
35200
- ) : void 0;
35201
- if (name) {
35202
- while (token() === 81 /* PrivateIdentifier */) {
35203
- reScanHashToken();
35204
- nextTokenJSDoc();
35205
- name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
35206
- }
35207
- }
35194
+ const name = parseJSDocLinkName();
35208
35195
  const text = [];
35209
35196
  while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
35210
35197
  text.push(scanner2.getTokenText());
@@ -35213,6 +35200,26 @@ ${lanes.join("\n")}
35213
35200
  const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
35214
35201
  return finishNode(create(name, text.join("")), start2, scanner2.getTokenEnd());
35215
35202
  }
35203
+ function parseJSDocLinkName() {
35204
+ if (tokenIsIdentifierOrKeyword(token())) {
35205
+ const pos = getNodePos();
35206
+ let name = parseIdentifierName();
35207
+ while (parseOptional(25 /* DotToken */)) {
35208
+ name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
35209
+ 80 /* Identifier */,
35210
+ /*reportAtCurrentPosition*/
35211
+ false
35212
+ ) : parseIdentifier()), pos);
35213
+ }
35214
+ while (token() === 81 /* PrivateIdentifier */) {
35215
+ reScanHashToken();
35216
+ nextTokenJSDoc();
35217
+ name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
35218
+ }
35219
+ return name;
35220
+ }
35221
+ return void 0;
35222
+ }
35216
35223
  function parseJSDocLinkPrefix() {
35217
35224
  skipWhitespaceOrAsterisk();
35218
35225
  if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
@@ -37807,7 +37814,7 @@ ${lanes.join("\n")}
37807
37814
  ["esnext.disposable", "lib.esnext.disposable.d.ts"],
37808
37815
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
37809
37816
  ["esnext.string", "lib.es2022.string.d.ts"],
37810
- ["esnext.promise", "lib.es2021.promise.d.ts"],
37817
+ ["esnext.promise", "lib.esnext.promise.d.ts"],
37811
37818
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
37812
37819
  ["esnext.decorators", "lib.esnext.decorators.d.ts"],
37813
37820
  ["decorators", "lib.decorators.d.ts"],
@@ -44303,7 +44310,7 @@ ${lanes.join("\n")}
44303
44310
  }
44304
44311
  function bindSpecialPropertyAssignment(node) {
44305
44312
  var _a;
44306
- const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, container) || lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer);
44313
+ const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer) || lookupSymbolForPropertyAccess(node.left.expression, container);
44307
44314
  if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) {
44308
44315
  return;
44309
44316
  }
@@ -44401,7 +44408,7 @@ ${lanes.join("\n")}
44401
44408
  return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */;
44402
44409
  }
44403
44410
  function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
44404
- let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
44411
+ let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container);
44405
44412
  const isToplevel = isTopLevelNamespaceAssignment(propertyAccess);
44406
44413
  namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass);
44407
44414
  bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty);
@@ -59417,8 +59424,6 @@ ${lanes.join("\n")}
59417
59424
  includes |= flags & 473694207 /* IncludesMask */;
59418
59425
  if (flags & 465829888 /* Instantiable */)
59419
59426
  includes |= 33554432 /* IncludesInstantiable */;
59420
- if (flags & 2097152 /* Intersection */ && getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */)
59421
- includes |= 268435456 /* IncludesConstrainedTypeVariable */;
59422
59427
  if (type === wildcardType)
59423
59428
  includes |= 8388608 /* IncludesWildcard */;
59424
59429
  if (!strictNullChecks && flags & 98304 /* Nullable */) {
@@ -59523,41 +59528,6 @@ ${lanes.join("\n")}
59523
59528
  }
59524
59529
  }
59525
59530
  }
59526
- function removeConstrainedTypeVariables(types) {
59527
- const typeVariables = [];
59528
- for (const type of types) {
59529
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
59530
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
59531
- pushIfUnique(typeVariables, type.types[index]);
59532
- }
59533
- }
59534
- for (const typeVariable of typeVariables) {
59535
- const primitives = [];
59536
- for (const type of types) {
59537
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
59538
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
59539
- if (type.types[index] === typeVariable) {
59540
- insertType(primitives, type.types[1 - index]);
59541
- }
59542
- }
59543
- }
59544
- const constraint = getBaseConstraintOfType(typeVariable);
59545
- if (everyType(constraint, (t) => containsType(primitives, t))) {
59546
- let i = types.length;
59547
- while (i > 0) {
59548
- i--;
59549
- const type = types[i];
59550
- if (getObjectFlags(type) & 67108864 /* IsConstrainedTypeVariable */) {
59551
- const index = type.types[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
59552
- if (type.types[index] === typeVariable && containsType(primitives, type.types[1 - index])) {
59553
- orderedRemoveItemAt(types, i);
59554
- }
59555
- }
59556
- }
59557
- insertType(types, typeVariable);
59558
- }
59559
- }
59560
- }
59561
59531
  function isNamedUnionType(type) {
59562
59532
  return !!(type.flags & 1048576 /* Union */ && (type.aliasSymbol || type.origin));
59563
59533
  }
@@ -59623,9 +59593,6 @@ ${lanes.join("\n")}
59623
59593
  if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) {
59624
59594
  removeStringLiteralsMatchedByTemplateLiterals(typeSet);
59625
59595
  }
59626
- if (includes & 268435456 /* IncludesConstrainedTypeVariable */) {
59627
- removeConstrainedTypeVariables(typeSet);
59628
- }
59629
59596
  if (unionReduction === 2 /* Subtype */) {
59630
59597
  typeSet = removeSubtypes(typeSet, !!(includes & 524288 /* Object */));
59631
59598
  if (!typeSet) {
@@ -59838,9 +59805,9 @@ ${lanes.join("\n")}
59838
59805
  types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */);
59839
59806
  return true;
59840
59807
  }
59841
- function createIntersectionType(types, objectFlags, aliasSymbol, aliasTypeArguments) {
59808
+ function createIntersectionType(types, aliasSymbol, aliasTypeArguments) {
59842
59809
  const result = createType(2097152 /* Intersection */);
59843
- result.objectFlags = objectFlags | getPropagatingFlagsOfTypes(
59810
+ result.objectFlags = getPropagatingFlagsOfTypes(
59844
59811
  types,
59845
59812
  /*excludeKinds*/
59846
59813
  98304 /* Nullable */
@@ -59854,7 +59821,6 @@ ${lanes.join("\n")}
59854
59821
  const typeMembershipMap = /* @__PURE__ */ new Map();
59855
59822
  const includes = addTypesToIntersection(typeMembershipMap, 0, types);
59856
59823
  const typeSet = arrayFrom(typeMembershipMap.values());
59857
- let objectFlags = 0 /* None */;
59858
59824
  if (includes & 131072 /* Never */) {
59859
59825
  return contains(typeSet, silentNeverType) ? silentNeverType : neverType;
59860
59826
  }
@@ -59883,25 +59849,6 @@ ${lanes.join("\n")}
59883
59849
  if (typeSet.length === 1) {
59884
59850
  return typeSet[0];
59885
59851
  }
59886
- if (typeSet.length === 2) {
59887
- const typeVarIndex = typeSet[0].flags & 8650752 /* TypeVariable */ ? 0 : 1;
59888
- const typeVariable = typeSet[typeVarIndex];
59889
- const primitiveType = typeSet[1 - typeVarIndex];
59890
- if (typeVariable.flags & 8650752 /* TypeVariable */ && (primitiveType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || includes & 16777216 /* IncludesEmptyObject */)) {
59891
- const constraint = getBaseConstraintOfType(typeVariable);
59892
- if (constraint && everyType(constraint, (t) => !!(t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) || isEmptyAnonymousObjectType(t))) {
59893
- if (isTypeStrictSubtypeOf(constraint, primitiveType)) {
59894
- return typeVariable;
59895
- }
59896
- if (!(constraint.flags & 1048576 /* Union */ && someType(constraint, (c) => isTypeStrictSubtypeOf(c, primitiveType)))) {
59897
- if (!isTypeStrictSubtypeOf(primitiveType, constraint)) {
59898
- return neverType;
59899
- }
59900
- }
59901
- objectFlags = 67108864 /* IsConstrainedTypeVariable */;
59902
- }
59903
- }
59904
- }
59905
59852
  const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments);
59906
59853
  let result = intersectionTypes.get(id);
59907
59854
  if (!result) {
@@ -59924,7 +59871,7 @@ ${lanes.join("\n")}
59924
59871
  result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin);
59925
59872
  }
59926
59873
  } else {
59927
- result = createIntersectionType(typeSet, objectFlags, aliasSymbol, aliasTypeArguments);
59874
+ result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
59928
59875
  }
59929
59876
  intersectionTypes.set(id, result);
59930
59877
  }
@@ -137590,11 +137537,9 @@ ${lanes.join("\n")}
137590
137537
  function getRangeToExtract(context, considerEmptySpans = true) {
137591
137538
  const { file, startPosition } = context;
137592
137539
  const isJS = isSourceFileJS(file);
137593
- const current = getTokenAtPosition(file, startPosition);
137594
137540
  const range = createTextRangeFromSpan(getRefactorContextSpan(context));
137595
- const cursorRequest = range.pos === range.end && considerEmptySpans;
137596
- const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end);
137597
- const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || overlappingRange));
137541
+ const isCursorRequest = range.pos === range.end && considerEmptySpans;
137542
+ const firstType = getFirstTypeAt(file, startPosition, range, isCursorRequest);
137598
137543
  if (!firstType || !isTypeNode(firstType))
137599
137544
  return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) };
137600
137545
  const checker = context.program.getTypeChecker();
@@ -137620,6 +137565,21 @@ ${lanes.join("\n")}
137620
137565
  const typeElements = flattenTypeLiteralNodeReference(checker, selection);
137621
137566
  return { isJS, selection, enclosingNode, typeParameters, typeElements };
137622
137567
  }
137568
+ function getFirstTypeAt(file, startPosition, range, isCursorRequest) {
137569
+ const currentNodes = [
137570
+ () => getTokenAtPosition(file, startPosition),
137571
+ () => getTouchingToken(file, startPosition, () => true)
137572
+ ];
137573
+ for (const f of currentNodes) {
137574
+ const current = f();
137575
+ const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end);
137576
+ const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (isCursorRequest || overlappingRange));
137577
+ if (firstType) {
137578
+ return firstType;
137579
+ }
137580
+ }
137581
+ return void 0;
137582
+ }
137623
137583
  function flattenTypeLiteralNodeReference(checker, selection) {
137624
137584
  if (!selection)
137625
137585
  return void 0;
@@ -165200,6 +165160,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165200
165160
  visitForDisplayParts(node.type);
165201
165161
  }
165202
165162
  break;
165163
+ case 181 /* IndexSignature */:
165164
+ Debug.assertNode(node, isIndexSignatureDeclaration);
165165
+ Debug.assertEqual(node.parameters.length, 1);
165166
+ parts.push({ text: "[" });
165167
+ visitForDisplayParts(node.parameters[0]);
165168
+ parts.push({ text: "]" });
165169
+ if (node.type) {
165170
+ parts.push({ text: ": " });
165171
+ visitForDisplayParts(node.type);
165172
+ }
165173
+ break;
165203
165174
  case 173 /* MethodSignature */:
165204
165175
  Debug.assertNode(node, isMethodSignature);
165205
165176
  if ((_b = node.modifiers) == null ? void 0 : _b.length) {
@@ -165249,6 +165220,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165249
165220
  parts.push({ text: tokenToString(node.operator) });
165250
165221
  visitForDisplayParts(node.operand);
165251
165222
  break;
165223
+ case 203 /* TemplateLiteralType */:
165224
+ Debug.assertNode(node, isTemplateLiteralTypeNode);
165225
+ visitForDisplayParts(node.head);
165226
+ node.templateSpans.forEach(visitForDisplayParts);
165227
+ break;
165228
+ case 16 /* TemplateHead */:
165229
+ Debug.assertNode(node, isTemplateHead);
165230
+ parts.push({ text: getLiteralText2(node) });
165231
+ break;
165232
+ case 204 /* TemplateLiteralTypeSpan */:
165233
+ Debug.assertNode(node, isTemplateLiteralTypeSpan);
165234
+ visitForDisplayParts(node.type);
165235
+ visitForDisplayParts(node.literal);
165236
+ break;
165237
+ case 17 /* TemplateMiddle */:
165238
+ Debug.assertNode(node, isTemplateMiddle);
165239
+ parts.push({ text: getLiteralText2(node) });
165240
+ break;
165241
+ case 18 /* TemplateTail */:
165242
+ Debug.assertNode(node, isTemplateTail);
165243
+ parts.push({ text: getLiteralText2(node) });
165244
+ break;
165252
165245
  case 197 /* ThisType */:
165253
165246
  Debug.assertNode(node, isThisTypeNode);
165254
165247
  parts.push({ text: "this" });
@@ -165276,8 +165269,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
165276
165269
  });
165277
165270
  }
165278
165271
  function getLiteralText2(node) {
165279
- if (isStringLiteral(node)) {
165280
- return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
165272
+ switch (node.kind) {
165273
+ case 11 /* StringLiteral */:
165274
+ return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`;
165275
+ case 16 /* TemplateHead */:
165276
+ case 17 /* TemplateMiddle */:
165277
+ case 18 /* TemplateTail */: {
165278
+ const rawText = node.rawText ?? escapeTemplateSubstitution(escapeString(node.text, 96 /* backtick */));
165279
+ switch (node.kind) {
165280
+ case 16 /* TemplateHead */:
165281
+ return "`" + rawText + "${";
165282
+ case 17 /* TemplateMiddle */:
165283
+ return "}" + rawText + "${";
165284
+ case 18 /* TemplateTail */:
165285
+ return "}" + rawText + "`";
165286
+ }
165287
+ }
165281
165288
  }
165282
165289
  return node.text;
165283
165290
  }
@@ -185058,6 +185065,7 @@ ${e.message}`;
185058
185065
  escapeNonAsciiString: () => escapeNonAsciiString,
185059
185066
  escapeSnippetText: () => escapeSnippetText,
185060
185067
  escapeString: () => escapeString,
185068
+ escapeTemplateSubstitution: () => escapeTemplateSubstitution,
185061
185069
  every: () => every,
185062
185070
  expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
185063
185071
  explainFiles: () => explainFiles,
@@ -187470,6 +187478,7 @@ ${e.message}`;
187470
187478
  escapeNonAsciiString: () => escapeNonAsciiString,
187471
187479
  escapeSnippetText: () => escapeSnippetText,
187472
187480
  escapeString: () => escapeString,
187481
+ escapeTemplateSubstitution: () => escapeTemplateSubstitution,
187473
187482
  every: () => every,
187474
187483
  expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression,
187475
187484
  explainFiles: () => explainFiles,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.4";
57
- var version = `${versionMajorMinor}.0-insiders.20231128`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231129`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -3105,7 +3105,6 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
3105
3105
  TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard";
3106
3106
  TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject";
3107
3107
  TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable";
3108
- TypeFlags2[TypeFlags2["IncludesConstrainedTypeVariable"] = 268435456 /* StringMapping */] = "IncludesConstrainedTypeVariable";
3109
3108
  TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion";
3110
3109
  return TypeFlags2;
3111
3110
  })(TypeFlags || {});
@@ -3152,7 +3151,6 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3152
3151
  ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion";
3153
3152
  ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed";
3154
3153
  ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection";
3155
- ObjectFlags3[ObjectFlags3["IsConstrainedTypeVariable"] = 67108864] = "IsConstrainedTypeVariable";
3156
3154
  return ObjectFlags3;
3157
3155
  })(ObjectFlags || {});
3158
3156
  var SignatureFlags = /* @__PURE__ */ ((SignatureFlags4) => {
@@ -24512,18 +24510,7 @@ var Parser;
24512
24510
  }
24513
24511
  nextTokenJSDoc();
24514
24512
  skipWhitespace();
24515
- const p2 = getNodePos();
24516
- let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName(
24517
- /*allowReservedWords*/
24518
- true
24519
- ) : void 0;
24520
- if (name) {
24521
- while (token() === 81 /* PrivateIdentifier */) {
24522
- reScanHashToken();
24523
- nextTokenJSDoc();
24524
- name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2);
24525
- }
24526
- }
24513
+ const name = parseJSDocLinkName();
24527
24514
  const text = [];
24528
24515
  while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) {
24529
24516
  text.push(scanner.getTokenText());
@@ -24532,6 +24519,26 @@ var Parser;
24532
24519
  const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain;
24533
24520
  return finishNode(create(name, text.join("")), start2, scanner.getTokenEnd());
24534
24521
  }
24522
+ function parseJSDocLinkName() {
24523
+ if (tokenIsIdentifierOrKeyword(token())) {
24524
+ const pos = getNodePos();
24525
+ let name = parseIdentifierName();
24526
+ while (parseOptional(25 /* DotToken */)) {
24527
+ name = finishNode(factory2.createQualifiedName(name, token() === 81 /* PrivateIdentifier */ ? createMissingNode(
24528
+ 80 /* Identifier */,
24529
+ /*reportAtCurrentPosition*/
24530
+ false
24531
+ ) : parseIdentifier()), pos);
24532
+ }
24533
+ while (token() === 81 /* PrivateIdentifier */) {
24534
+ reScanHashToken();
24535
+ nextTokenJSDoc();
24536
+ name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), pos);
24537
+ }
24538
+ return name;
24539
+ }
24540
+ return void 0;
24541
+ }
24535
24542
  function parseJSDocLinkPrefix() {
24536
24543
  skipWhitespaceOrAsterisk();
24537
24544
  if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
@@ -25699,7 +25706,7 @@ var libEntries = [
25699
25706
  ["esnext.disposable", "lib.esnext.disposable.d.ts"],
25700
25707
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
25701
25708
  ["esnext.string", "lib.es2022.string.d.ts"],
25702
- ["esnext.promise", "lib.es2021.promise.d.ts"],
25709
+ ["esnext.promise", "lib.esnext.promise.d.ts"],
25703
25710
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
25704
25711
  ["esnext.decorators", "lib.esnext.decorators.d.ts"],
25705
25712
  ["decorators", "lib.decorators.d.ts"],
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.4.0-pr-56515-12",
5
+ "version": "5.4.0-pr-56467-3",
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": "008fd1d8f1e1f4a0836341b6ba0977db9061d24a"
118
+ "gitHead": "4f75681dfab9e608105b374efa1f97eeaf478845"
119
119
  }