@typescript-deploys/pr-build 5.5.0-pr-57133-22 → 5.5.0-pr-57575-41

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.
@@ -55,10 +55,22 @@ declare namespace Intl {
55
55
 
56
56
  const PluralRules: PluralRulesConstructor;
57
57
 
58
- // We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
59
- type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
60
- type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
61
- type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;
58
+ interface NumberFormatPartTypeRegistry {
59
+ literal: never;
60
+ nan: never;
61
+ infinity: never;
62
+ percent: never;
63
+ integer: never;
64
+ group: never;
65
+ decimal: never;
66
+ fraction: never;
67
+ plusSign: never;
68
+ minusSign: never;
69
+ percentSign: never;
70
+ currency: never;
71
+ }
72
+
73
+ type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
62
74
 
63
75
  interface NumberFormatPart {
64
76
  type: NumberFormatPartTypes;
@@ -18,6 +18,6 @@ and limitations under the License.
18
18
 
19
19
  declare namespace Intl {
20
20
  interface DateTimeFormatPartTypesRegistry {
21
- unknown: any;
21
+ unknown: never;
22
22
  }
23
23
  }
@@ -723,6 +723,5 @@ interface DataView {
723
723
  declare namespace Intl {
724
724
  interface NumberFormat {
725
725
  format(value: number | bigint): string;
726
- resolvedOptions(): ResolvedNumberFormatOptions;
727
726
  }
728
727
  }
@@ -241,24 +241,49 @@ declare namespace Intl {
241
241
  ): UnicodeBCP47LocaleIdentifier[];
242
242
  };
243
243
 
244
+ interface NumberFormatOptionsStyleRegistry {
245
+ unit: never;
246
+ }
247
+
248
+ interface NumberFormatOptionsCurrencyDisplayRegistry {
249
+ narrowSymbol: never;
250
+ }
251
+
252
+ interface NumberFormatOptionsSignDisplayRegistry {
253
+ auto: never;
254
+ never: never;
255
+ always: never;
256
+ exceptZero: never;
257
+ }
258
+
259
+ type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry;
260
+
244
261
  interface NumberFormatOptions {
262
+ numberingSystem?: string | undefined;
245
263
  compactDisplay?: "short" | "long" | undefined;
246
264
  notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
247
- signDisplay?: "auto" | "never" | "always" | "exceptZero" | undefined;
265
+ signDisplay?: NumberFormatOptionsSignDisplay | undefined;
248
266
  unit?: string | undefined;
249
267
  unitDisplay?: "short" | "long" | "narrow" | undefined;
250
- currencyDisplay?: string | undefined;
251
- currencySign?: string | undefined;
268
+ currencySign?: "standard" | "accounting" | undefined;
252
269
  }
253
270
 
254
271
  interface ResolvedNumberFormatOptions {
255
272
  compactDisplay?: "short" | "long";
256
- notation?: "standard" | "scientific" | "engineering" | "compact";
257
- signDisplay?: "auto" | "never" | "always" | "exceptZero";
273
+ notation: "standard" | "scientific" | "engineering" | "compact";
274
+ signDisplay: NumberFormatOptionsSignDisplay;
258
275
  unit?: string;
259
276
  unitDisplay?: "short" | "long" | "narrow";
260
- currencyDisplay?: string;
261
- currencySign?: string;
277
+ currencySign?: "standard" | "accounting";
278
+ }
279
+
280
+ interface NumberFormatPartTypeRegistry {
281
+ compact: never;
282
+ exponentInteger: never;
283
+ exponentMinusSign: never;
284
+ exponentSeparator: never;
285
+ unit: never;
286
+ unknown: never;
262
287
  }
263
288
 
264
289
  interface DateTimeFormatOptions {
@@ -19,3 +19,4 @@ and limitations under the License.
19
19
  /// <reference lib="es2022" />
20
20
  /// <reference lib="es2023.array" />
21
21
  /// <reference lib="es2023.collection" />
22
+ /// <reference lib="es2023.intl" />
@@ -0,0 +1,52 @@
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
+ declare namespace Intl {
20
+ interface NumberFormatOptionsUseGroupingRegistry {
21
+ min2: never;
22
+ auto: never;
23
+ always: never;
24
+ }
25
+
26
+ interface NumberFormatOptionsSignDisplayRegistry {
27
+ negative: never;
28
+ }
29
+
30
+ interface NumberFormatOptions {
31
+ roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
32
+ roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
33
+ roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
34
+ trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
35
+ }
36
+
37
+ interface ResolvedNumberFormatOptions {
38
+ roundingPriority: "auto" | "morePrecision" | "lessPrecision";
39
+ roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
40
+ roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
41
+ trailingZeroDisplay: "auto" | "stripIfInteger";
42
+ }
43
+
44
+ interface NumberRangeFormatPart extends NumberFormatPart {
45
+ source: "startRange" | "endRange" | "shared";
46
+ }
47
+
48
+ interface NumberFormat {
49
+ formatRange(start: number | bigint, end: number | bigint): string;
50
+ formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
51
+ }
52
+ }
package/lib/lib.es5.d.ts CHANGED
@@ -4433,12 +4433,33 @@ declare namespace Intl {
4433
4433
 
4434
4434
  var Collator: CollatorConstructor;
4435
4435
 
4436
+ interface NumberFormatOptionsStyleRegistry {
4437
+ decimal: never;
4438
+ percent: never;
4439
+ currency: never;
4440
+ }
4441
+
4442
+ type NumberFormatOptionsStyle = keyof NumberFormatOptionsStyleRegistry;
4443
+
4444
+ interface NumberFormatOptionsCurrencyDisplayRegistry {
4445
+ code: never;
4446
+ symbol: never;
4447
+ name: never;
4448
+ }
4449
+
4450
+ type NumberFormatOptionsCurrencyDisplay = keyof NumberFormatOptionsCurrencyDisplayRegistry;
4451
+
4452
+ interface NumberFormatOptionsUseGroupingRegistry {}
4453
+
4454
+ type NumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | "true" | "false" | boolean;
4455
+ type ResolvedNumberFormatOptionsUseGrouping = {} extends NumberFormatOptionsUseGroupingRegistry ? boolean : keyof NumberFormatOptionsUseGroupingRegistry | false;
4456
+
4436
4457
  interface NumberFormatOptions {
4437
- localeMatcher?: string | undefined;
4438
- style?: string | undefined;
4458
+ localeMatcher?: "lookup" | "best fit" | undefined;
4459
+ style?: NumberFormatOptionsStyle | undefined;
4439
4460
  currency?: string | undefined;
4440
- currencySign?: string | undefined;
4441
- useGrouping?: boolean | undefined;
4461
+ currencyDisplay?: NumberFormatOptionsCurrencyDisplay | undefined;
4462
+ useGrouping?: NumberFormatOptionsUseGrouping | undefined;
4442
4463
  minimumIntegerDigits?: number | undefined;
4443
4464
  minimumFractionDigits?: number | undefined;
4444
4465
  maximumFractionDigits?: number | undefined;
@@ -4449,14 +4470,15 @@ declare namespace Intl {
4449
4470
  interface ResolvedNumberFormatOptions {
4450
4471
  locale: string;
4451
4472
  numberingSystem: string;
4452
- style: string;
4473
+ style: NumberFormatOptionsStyle;
4453
4474
  currency?: string;
4475
+ currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
4454
4476
  minimumIntegerDigits: number;
4455
- minimumFractionDigits: number;
4456
- maximumFractionDigits: number;
4477
+ minimumFractionDigits?: number;
4478
+ maximumFractionDigits?: number;
4457
4479
  minimumSignificantDigits?: number;
4458
4480
  maximumSignificantDigits?: number;
4459
- useGrouping: boolean;
4481
+ useGrouping: ResolvedNumberFormatOptionsUseGrouping;
4460
4482
  }
4461
4483
 
4462
4484
  interface NumberFormat {
@@ -17,12 +17,5 @@ and limitations under the License.
17
17
  /// <reference no-default-lib="true"/>
18
18
 
19
19
  declare namespace Intl {
20
- interface NumberRangeFormatPart extends NumberFormatPart {
21
- source: "startRange" | "endRange" | "shared";
22
- }
23
-
24
- interface NumberFormat {
25
- formatRange(start: number | bigint, end: number | bigint): string;
26
- formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
27
- }
20
+ // Empty
28
21
  }
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.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240229`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240301`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -33723,6 +33723,7 @@ var libEntries = [
33723
33723
  ["es2022.regexp", "lib.es2022.regexp.d.ts"],
33724
33724
  ["es2023.array", "lib.es2023.array.d.ts"],
33725
33725
  ["es2023.collection", "lib.es2023.collection.d.ts"],
33726
+ ["es2023.intl", "lib.es2023.intl.d.ts"],
33726
33727
  ["esnext.array", "lib.es2023.array.d.ts"],
33727
33728
  ["esnext.collection", "lib.esnext.collection.d.ts"],
33728
33729
  ["esnext.symbol", "lib.es2019.symbol.d.ts"],
@@ -44177,8 +44178,6 @@ function createTypeChecker(host) {
44177
44178
  var comparableRelation = /* @__PURE__ */ new Map();
44178
44179
  var identityRelation = /* @__PURE__ */ new Map();
44179
44180
  var enumRelation = /* @__PURE__ */ new Map();
44180
- var builtinGlobals = createSymbolTable();
44181
- builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
44182
44181
  var suggestedExtensions = [
44183
44182
  [".mts", ".mjs"],
44184
44183
  [".ts", ".js"],
@@ -44596,17 +44595,17 @@ function createTypeChecker(host) {
44596
44595
  }
44597
44596
  }
44598
44597
  }
44599
- function addToSymbolTable(target, source, message) {
44600
- source.forEach((sourceSymbol, id) => {
44601
- const targetSymbol = target.get(id);
44602
- if (targetSymbol) {
44603
- forEach(targetSymbol.declarations, addDeclarationDiagnostic(unescapeLeadingUnderscores(id), message));
44604
- } else {
44605
- target.set(id, sourceSymbol);
44606
- }
44607
- });
44608
- function addDeclarationDiagnostic(id, message2) {
44609
- return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
44598
+ function addUndefinedToGlobalsOrErrorOnRedeclaration() {
44599
+ const name = undefinedSymbol.escapedName;
44600
+ const targetSymbol = globals.get(name);
44601
+ if (targetSymbol) {
44602
+ forEach(targetSymbol.declarations, (declaration) => {
44603
+ if (!isTypeDeclaration(declaration)) {
44604
+ diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, unescapeLeadingUnderscores(name)));
44605
+ }
44606
+ });
44607
+ } else {
44608
+ globals.set(name, undefinedSymbol);
44610
44609
  }
44611
44610
  }
44612
44611
  function getSymbolLinks(symbol) {
@@ -78621,7 +78620,9 @@ function createTypeChecker(host) {
78621
78620
  function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {
78622
78621
  const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
78623
78622
  if (inputType === neverType) {
78624
- reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
78623
+ if (errorNode) {
78624
+ reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
78625
+ }
78625
78626
  return void 0;
78626
78627
  }
78627
78628
  const uplevelIteration = languageVersion >= 2 /* ES2015 */;
@@ -79464,6 +79465,7 @@ function createTypeChecker(host) {
79464
79465
  case "symbol":
79465
79466
  case "void":
79466
79467
  case "object":
79468
+ case "undefined":
79467
79469
  error(name, message, name.escapedText);
79468
79470
  }
79469
79471
  }
@@ -83166,7 +83168,7 @@ function createTypeChecker(host) {
83166
83168
  }
83167
83169
  }
83168
83170
  }
83169
- addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
83171
+ addUndefinedToGlobalsOrErrorOnRedeclaration();
83170
83172
  getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
83171
83173
  getSymbolLinks(argumentsSymbol).type = getGlobalType(
83172
83174
  "IArguments",
package/lib/tsserver.js CHANGED
@@ -2325,7 +2325,7 @@ module.exports = __toCommonJS(server_exports);
2325
2325
 
2326
2326
  // src/compiler/corePublic.ts
2327
2327
  var versionMajorMinor = "5.5";
2328
- var version = `${versionMajorMinor}.0-insiders.20240229`;
2328
+ var version = `${versionMajorMinor}.0-insiders.20240301`;
2329
2329
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2330
2330
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2331
2331
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -38133,6 +38133,7 @@ var libEntries = [
38133
38133
  ["es2022.regexp", "lib.es2022.regexp.d.ts"],
38134
38134
  ["es2023.array", "lib.es2023.array.d.ts"],
38135
38135
  ["es2023.collection", "lib.es2023.collection.d.ts"],
38136
+ ["es2023.intl", "lib.es2023.intl.d.ts"],
38136
38137
  ["esnext.array", "lib.es2023.array.d.ts"],
38137
38138
  ["esnext.collection", "lib.esnext.collection.d.ts"],
38138
38139
  ["esnext.symbol", "lib.es2019.symbol.d.ts"],
@@ -48896,8 +48897,6 @@ function createTypeChecker(host) {
48896
48897
  var comparableRelation = /* @__PURE__ */ new Map();
48897
48898
  var identityRelation = /* @__PURE__ */ new Map();
48898
48899
  var enumRelation = /* @__PURE__ */ new Map();
48899
- var builtinGlobals = createSymbolTable();
48900
- builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
48901
48900
  var suggestedExtensions = [
48902
48901
  [".mts", ".mjs"],
48903
48902
  [".ts", ".js"],
@@ -49315,17 +49314,17 @@ function createTypeChecker(host) {
49315
49314
  }
49316
49315
  }
49317
49316
  }
49318
- function addToSymbolTable(target, source, message) {
49319
- source.forEach((sourceSymbol, id) => {
49320
- const targetSymbol = target.get(id);
49321
- if (targetSymbol) {
49322
- forEach(targetSymbol.declarations, addDeclarationDiagnostic(unescapeLeadingUnderscores(id), message));
49323
- } else {
49324
- target.set(id, sourceSymbol);
49325
- }
49326
- });
49327
- function addDeclarationDiagnostic(id, message2) {
49328
- return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id));
49317
+ function addUndefinedToGlobalsOrErrorOnRedeclaration() {
49318
+ const name = undefinedSymbol.escapedName;
49319
+ const targetSymbol = globals.get(name);
49320
+ if (targetSymbol) {
49321
+ forEach(targetSymbol.declarations, (declaration) => {
49322
+ if (!isTypeDeclaration(declaration)) {
49323
+ diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, unescapeLeadingUnderscores(name)));
49324
+ }
49325
+ });
49326
+ } else {
49327
+ globals.set(name, undefinedSymbol);
49329
49328
  }
49330
49329
  }
49331
49330
  function getSymbolLinks(symbol) {
@@ -83340,7 +83339,9 @@ function createTypeChecker(host) {
83340
83339
  function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) {
83341
83340
  const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0;
83342
83341
  if (inputType === neverType) {
83343
- reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
83342
+ if (errorNode) {
83343
+ reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables);
83344
+ }
83344
83345
  return void 0;
83345
83346
  }
83346
83347
  const uplevelIteration = languageVersion >= 2 /* ES2015 */;
@@ -84183,6 +84184,7 @@ function createTypeChecker(host) {
84183
84184
  case "symbol":
84184
84185
  case "void":
84185
84186
  case "object":
84187
+ case "undefined":
84186
84188
  error2(name, message, name.escapedText);
84187
84189
  }
84188
84190
  }
@@ -87885,7 +87887,7 @@ function createTypeChecker(host) {
87885
87887
  }
87886
87888
  }
87887
87889
  }
87888
- addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0);
87890
+ addUndefinedToGlobalsOrErrorOnRedeclaration();
87889
87891
  getSymbolLinks(undefinedSymbol).type = undefinedWideningType;
87890
87892
  getSymbolLinks(argumentsSymbol).type = getGlobalType(
87891
87893
  "IArguments",