@typescript-deploys/pr-build 5.7.0-pr-56460-9 → 5.7.0-pr-58573-47

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.
@@ -0,0 +1,29 @@
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 MapConstructor {
20
+ /**
21
+ * Groups members of an iterable according to the return value of the passed callback.
22
+ * @param items An iterable.
23
+ * @param keySelector A callback which will be invoked for each item in items.
24
+ */
25
+ groupBy<K, T>(
26
+ items: Iterable<T>,
27
+ keySelector: (item: T, index: number) => K,
28
+ ): Map<K, T[]>;
29
+ }
@@ -0,0 +1,26 @@
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
+ /// <reference lib="es2023" />
20
+ /// <reference lib="es2024.arraybuffer" />
21
+ /// <reference lib="es2024.collection" />
22
+ /// <reference lib="es2024.object" />
23
+ /// <reference lib="es2024.promise" />
24
+ /// <reference lib="es2024.regexp" />
25
+ /// <reference lib="es2024.sharedmemory" />
26
+ /// <reference lib="es2024.string" />
@@ -0,0 +1,24 @@
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
+ /// <reference lib="es2024" />
20
+ /// <reference lib="dom" />
21
+ /// <reference lib="webworker.importscripts" />
22
+ /// <reference lib="scripthost" />
23
+ /// <reference lib="dom.iterable" />
24
+ /// <reference lib="dom.asynciterable" />
@@ -16,6 +16,8 @@ and limitations under the License.
16
16
 
17
17
  /// <reference no-default-lib="true"/>
18
18
 
19
+ /// <reference lib="es2020.bigint" />
20
+
19
21
  interface Atomics {
20
22
  /**
21
23
  * A non-blocking, asynchronous version of wait which is usable on the main thread.
@@ -37,3 +39,30 @@ interface Atomics {
37
39
  */
38
40
  waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
39
41
  }
42
+
43
+ interface SharedArrayBuffer {
44
+ /**
45
+ * Returns true if this SharedArrayBuffer can be grown.
46
+ *
47
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable)
48
+ */
49
+ get growable(): number;
50
+
51
+ /**
52
+ * If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not.
53
+ *
54
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength)
55
+ */
56
+ get maxByteLength(): number;
57
+
58
+ /**
59
+ * Grows the SharedArrayBuffer to the specified size (in bytes).
60
+ *
61
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow)
62
+ */
63
+ grow(newByteLength?: number): void;
64
+ }
65
+
66
+ interface SharedArrayBufferConstructor {
67
+ new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer;
68
+ }
package/lib/lib.es5.d.ts CHANGED
@@ -1701,7 +1701,7 @@ interface ArrayBuffer {
1701
1701
  /**
1702
1702
  * Returns a section of an ArrayBuffer.
1703
1703
  */
1704
- slice(begin: number, end?: number): ArrayBuffer;
1704
+ slice(begin?: number, end?: number): ArrayBuffer;
1705
1705
  }
1706
1706
 
1707
1707
  /**
@@ -16,17 +16,7 @@ and limitations under the License.
16
16
 
17
17
  /// <reference no-default-lib="true"/>
18
18
 
19
- interface MapConstructor {
20
- /**
21
- * Groups members of an iterable according to the return value of the passed callback.
22
- * @param items An iterable.
23
- * @param keySelector A callback which will be invoked for each item in items.
24
- */
25
- groupBy<K, T>(
26
- items: Iterable<T>,
27
- keySelector: (item: T, index: number) => K,
28
- ): Map<K, T[]>;
29
- }
19
+ /// <reference lib="es2024.collection" />
30
20
 
31
21
  interface ReadonlySetLike<T> {
32
22
  /**
@@ -16,14 +16,10 @@ and limitations under the License.
16
16
 
17
17
  /// <reference no-default-lib="true"/>
18
18
 
19
- /// <reference lib="es2023" />
19
+ /// <reference lib="es2024" />
20
20
  /// <reference lib="esnext.intl" />
21
21
  /// <reference lib="esnext.decorators" />
22
22
  /// <reference lib="esnext.disposable" />
23
- /// <reference lib="esnext.promise" />
24
- /// <reference lib="esnext.object" />
25
23
  /// <reference lib="esnext.collection" />
26
24
  /// <reference lib="esnext.array" />
27
- /// <reference lib="esnext.regexp" />
28
- /// <reference lib="esnext.string" />
29
25
  /// <reference lib="esnext.iterator" />
package/lib/tsc.js CHANGED
@@ -3885,10 +3885,10 @@ var LanguageFeatureMinimumTarget = {
3885
3885
  ClassFields: 9 /* ES2022 */,
3886
3886
  PrivateNamesAndClassStaticBlocks: 9 /* ES2022 */,
3887
3887
  RegularExpressionFlagsHasIndices: 9 /* ES2022 */,
3888
- ShebangComments: 99 /* ESNext */,
3888
+ ShebangComments: 10 /* ES2023 */,
3889
+ RegularExpressionFlagsUnicodeSets: 11 /* ES2024 */,
3889
3890
  UsingAndAwaitUsing: 99 /* ESNext */,
3890
- ClassAndClassElementDecorators: 99 /* ESNext */,
3891
- RegularExpressionFlagsUnicodeSets: 99 /* ESNext */
3891
+ ClassAndClassElementDecorators: 99 /* ESNext */
3892
3892
  };
3893
3893
  var commentPragmas = {
3894
3894
  "reference": {
@@ -13011,11 +13011,45 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13011
13011
  AsyncIterator: new Map(Object.entries({
13012
13012
  es2015: emptyArray
13013
13013
  })),
13014
+ ArrayBuffer: new Map(Object.entries({
13015
+ es2024: [
13016
+ "maxByteLength",
13017
+ "resizable",
13018
+ "resize",
13019
+ "detached",
13020
+ "transfer",
13021
+ "transferToFixedLength"
13022
+ ]
13023
+ })),
13014
13024
  Atomics: new Map(Object.entries({
13015
- es2017: emptyArray
13025
+ es2017: [
13026
+ "add",
13027
+ "and",
13028
+ "compareExchange",
13029
+ "exchange",
13030
+ "isLockFree",
13031
+ "load",
13032
+ "or",
13033
+ "store",
13034
+ "sub",
13035
+ "wait",
13036
+ "notify",
13037
+ "xor"
13038
+ ],
13039
+ es2024: [
13040
+ "waitAsync"
13041
+ ]
13016
13042
  })),
13017
13043
  SharedArrayBuffer: new Map(Object.entries({
13018
- es2017: emptyArray
13044
+ es2017: [
13045
+ "byteLength",
13046
+ "slice"
13047
+ ],
13048
+ es2024: [
13049
+ "growable",
13050
+ "maxByteLength",
13051
+ "grow"
13052
+ ]
13019
13053
  })),
13020
13054
  AsyncIterable: new Map(Object.entries({
13021
13055
  es2018: emptyArray
@@ -13037,6 +13071,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13037
13071
  ],
13038
13072
  es2018: [
13039
13073
  "dotAll"
13074
+ ],
13075
+ es2024: [
13076
+ "unicodeSets"
13040
13077
  ]
13041
13078
  })),
13042
13079
  Reflect: new Map(Object.entries({
@@ -13083,6 +13120,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13083
13120
  ],
13084
13121
  es2022: [
13085
13122
  "hasOwn"
13123
+ ],
13124
+ es2024: [
13125
+ "groupBy"
13086
13126
  ]
13087
13127
  })),
13088
13128
  NumberConstructor: new Map(Object.entries({
@@ -13123,11 +13163,25 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13123
13163
  "values"
13124
13164
  ]
13125
13165
  })),
13166
+ MapConstructor: new Map(Object.entries({
13167
+ es2024: [
13168
+ "groupBy"
13169
+ ]
13170
+ })),
13126
13171
  Set: new Map(Object.entries({
13127
13172
  es2015: [
13128
13173
  "entries",
13129
13174
  "keys",
13130
13175
  "values"
13176
+ ],
13177
+ esnext: [
13178
+ "union",
13179
+ "intersection",
13180
+ "difference",
13181
+ "symmetricDifference",
13182
+ "isSubsetOf",
13183
+ "isSupersetOf",
13184
+ "isDisjointFrom"
13131
13185
  ]
13132
13186
  })),
13133
13187
  PromiseConstructor: new Map(Object.entries({
@@ -13142,6 +13196,9 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13142
13196
  ],
13143
13197
  es2021: [
13144
13198
  "any"
13199
+ ],
13200
+ es2024: [
13201
+ "withResolvers"
13145
13202
  ]
13146
13203
  })),
13147
13204
  Symbol: new Map(Object.entries({
@@ -13208,7 +13265,7 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13208
13265
  es2022: [
13209
13266
  "at"
13210
13267
  ],
13211
- esnext: [
13268
+ es2024: [
13212
13269
  "isWellFormed",
13213
13270
  "toWellFormed"
13214
13271
  ]
@@ -13253,6 +13310,11 @@ var getScriptTargetFeatures = /* @__PURE__ */ memoize(
13253
13310
  SymbolConstructor: new Map(Object.entries({
13254
13311
  es2020: [
13255
13312
  "matchAll"
13313
+ ],
13314
+ esnext: [
13315
+ "metadata",
13316
+ "dispose",
13317
+ "asyncDispose"
13256
13318
  ]
13257
13319
  })),
13258
13320
  DataView: new Map(Object.entries({
@@ -35848,6 +35910,7 @@ var libEntries = [
35848
35910
  ["es2021", "lib.es2021.d.ts"],
35849
35911
  ["es2022", "lib.es2022.d.ts"],
35850
35912
  ["es2023", "lib.es2023.d.ts"],
35913
+ ["es2024", "lib.es2024.d.ts"],
35851
35914
  ["esnext", "lib.esnext.d.ts"],
35852
35915
  // Host only
35853
35916
  ["dom", "lib.dom.d.ts"],
@@ -35870,6 +35933,7 @@ var libEntries = [
35870
35933
  ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
35871
35934
  ["es2016.array.include", "lib.es2016.array.include.d.ts"],
35872
35935
  ["es2016.intl", "lib.es2016.intl.d.ts"],
35936
+ ["es2017.arraybuffer", "lib.es2017.arraybuffer.d.ts"],
35873
35937
  ["es2017.date", "lib.es2017.date.d.ts"],
35874
35938
  ["es2017.object", "lib.es2017.object.d.ts"],
35875
35939
  ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
@@ -35902,12 +35966,18 @@ var libEntries = [
35902
35966
  ["es2022.error", "lib.es2022.error.d.ts"],
35903
35967
  ["es2022.intl", "lib.es2022.intl.d.ts"],
35904
35968
  ["es2022.object", "lib.es2022.object.d.ts"],
35905
- ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"],
35906
35969
  ["es2022.string", "lib.es2022.string.d.ts"],
35907
35970
  ["es2022.regexp", "lib.es2022.regexp.d.ts"],
35908
35971
  ["es2023.array", "lib.es2023.array.d.ts"],
35909
35972
  ["es2023.collection", "lib.es2023.collection.d.ts"],
35910
35973
  ["es2023.intl", "lib.es2023.intl.d.ts"],
35974
+ ["es2024.arraybuffer", "lib.es2024.arraybuffer.d.ts"],
35975
+ ["es2024.collection", "lib.es2024.collection.d.ts"],
35976
+ ["es2024.object", "lib.es2024.object.d.ts"],
35977
+ ["es2024.promise", "lib.es2024.promise.d.ts"],
35978
+ ["es2024.regexp", "lib.es2024.regexp.d.ts"],
35979
+ ["es2024.sharedmemory", "lib.es2024.sharedmemory.d.ts"],
35980
+ ["es2024.string", "lib.es2024.string.d.ts"],
35911
35981
  ["esnext.array", "lib.es2023.array.d.ts"],
35912
35982
  ["esnext.collection", "lib.esnext.collection.d.ts"],
35913
35983
  ["esnext.symbol", "lib.es2019.symbol.d.ts"],
@@ -35916,13 +35986,13 @@ var libEntries = [
35916
35986
  ["esnext.disposable", "lib.esnext.disposable.d.ts"],
35917
35987
  ["esnext.bigint", "lib.es2020.bigint.d.ts"],
35918
35988
  ["esnext.string", "lib.es2022.string.d.ts"],
35919
- ["esnext.promise", "lib.esnext.promise.d.ts"],
35989
+ ["esnext.promise", "lib.es2024.promise.d.ts"],
35920
35990
  ["esnext.weakref", "lib.es2021.weakref.d.ts"],
35921
35991
  ["esnext.decorators", "lib.esnext.decorators.d.ts"],
35922
- ["esnext.object", "lib.esnext.object.d.ts"],
35992
+ ["esnext.object", "lib.es2024.object.d.ts"],
35923
35993
  ["esnext.array", "lib.esnext.array.d.ts"],
35924
- ["esnext.regexp", "lib.esnext.regexp.d.ts"],
35925
- ["esnext.string", "lib.esnext.string.d.ts"],
35994
+ ["esnext.regexp", "lib.es2024.regexp.d.ts"],
35995
+ ["esnext.string", "lib.es2024.string.d.ts"],
35926
35996
  ["esnext.iterator", "lib.esnext.iterator.d.ts"],
35927
35997
  ["decorators", "lib.decorators.d.ts"],
35928
35998
  ["decorators.legacy", "lib.decorators.legacy.d.ts"]
@@ -36221,6 +36291,7 @@ var targetOptionDeclaration = {
36221
36291
  es2021: 8 /* ES2021 */,
36222
36292
  es2022: 9 /* ES2022 */,
36223
36293
  es2023: 10 /* ES2023 */,
36294
+ es2024: 11 /* ES2024 */,
36224
36295
  esnext: 99 /* ESNext */
36225
36296
  })),
36226
36297
  affectsSourceFile: true,
@@ -48696,7 +48767,7 @@ function createTypeChecker(host) {
48696
48767
  return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, !ignoreErrors ? moduleReferenceExpression : void 0, isForAugmentation) : void 0;
48697
48768
  }
48698
48769
  function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) {
48699
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
48770
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
48700
48771
  if (errorNode && startsWith(moduleReference, "@types/")) {
48701
48772
  const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
48702
48773
  const withoutAtTypePrefix = removePrefix(moduleReference, "@types/");
@@ -48711,14 +48782,14 @@ function createTypeChecker(host) {
48711
48782
  return ambientModule;
48712
48783
  }
48713
48784
  const currentSourceFile = getSourceFileOfNode(location);
48714
- const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : void 0) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
48785
+ const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _a.name) || ((_b = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _b.argument.literal) || (isVariableDeclaration(location) && location.initializer && isRequireCall(
48715
48786
  location.initializer,
48716
48787
  /*requireStringLiteralLikeArgument*/
48717
48788
  true
48718
- ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, isImportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression) || ((_f = findAncestor(location, isExportDeclaration)) == null ? void 0 : _f.moduleSpecifier);
48789
+ ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, or(isImportDeclaration, isJSDocImportTag, isExportDeclaration))) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression);
48719
48790
  const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : host.getDefaultResolutionModeForFile(currentSourceFile);
48720
48791
  const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
48721
- const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule;
48792
+ const resolvedModule = (_f = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _f.resolvedModule;
48722
48793
  const resolutionDiagnostic = errorNode && resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);
48723
48794
  const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);
48724
48795
  if (sourceFile) {
@@ -48726,7 +48797,7 @@ function createTypeChecker(host) {
48726
48797
  error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName);
48727
48798
  }
48728
48799
  if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) {
48729
- const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
48800
+ const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
48730
48801
  if (errorNode && importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) {
48731
48802
  error(
48732
48803
  errorNode,
@@ -48735,7 +48806,7 @@ function createTypeChecker(host) {
48735
48806
  );
48736
48807
  }
48737
48808
  } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) {
48738
- const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
48809
+ const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration));
48739
48810
  if (errorNode && !((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) {
48740
48811
  const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference));
48741
48812
  error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension);
@@ -48765,7 +48836,7 @@ function createTypeChecker(host) {
48765
48836
  if (ext === ".ts" /* Ts */ || ext === ".js" /* Js */ || ext === ".tsx" /* Tsx */ || ext === ".jsx" /* Jsx */) {
48766
48837
  diagnosticDetails = createModeMismatchDetails(currentSourceFile);
48767
48838
  }
48768
- const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_j = overrideHost.importClause) == null ? void 0 : _j.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
48839
+ const message = (overrideHost == null ? void 0 : overrideHost.kind) === 272 /* ImportDeclaration */ && ((_i = overrideHost.importClause) == null ? void 0 : _i.isTypeOnly) ? Diagnostics.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : (overrideHost == null ? void 0 : overrideHost.kind) === 205 /* ImportType */ ? Diagnostics.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead;
48769
48840
  diagnostics.add(createDiagnosticForNodeFromMessageChain(
48770
48841
  getSourceFileOfNode(errorNode),
48771
48842
  errorNode,
@@ -48828,14 +48899,14 @@ function createTypeChecker(host) {
48828
48899
  error(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
48829
48900
  } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) {
48830
48901
  const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path));
48831
- const suggestedExt = (_k = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _k[1];
48902
+ const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1];
48832
48903
  if (suggestedExt) {
48833
48904
  error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
48834
48905
  } else {
48835
48906
  error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path);
48836
48907
  }
48837
48908
  } else {
48838
- if ((_l = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _l.alternateResult) {
48909
+ if ((_k = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _k.alternateResult) {
48839
48910
  const errorInfo = createModuleNotFoundChain(currentSourceFile, host, moduleReference, mode, moduleReference);
48840
48911
  errorOrSuggestion(
48841
48912
  /*isError*/
@@ -52034,7 +52105,13 @@ function createTypeChecker(host) {
52034
52105
  if (typeFromTypeNode === type) {
52035
52106
  return true;
52036
52107
  }
52037
- if (annotatedDeclaration && (isParameter(annotatedDeclaration) || isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
52108
+ if (!annotatedDeclaration) {
52109
+ return false;
52110
+ }
52111
+ if ((isPropertySignature(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) {
52112
+ return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode;
52113
+ }
52114
+ if (isParameter(annotatedDeclaration) && hasEffectiveQuestionToken(annotatedDeclaration)) {
52038
52115
  return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode;
52039
52116
  }
52040
52117
  return false;
@@ -52995,7 +53072,9 @@ function createTypeChecker(host) {
52995
53072
  const skipMembershipCheck = !isPrivate;
52996
53073
  if (skipMembershipCheck || !!length(symbol.declarations) && some(symbol.declarations, (d) => !!findAncestor(d, (n) => n === enclosingDeclaration))) {
52997
53074
  const scopeCleanup = cloneNodeBuilderContext(context);
53075
+ context.tracker.pushErrorFallbackNode(find(symbol.declarations, (d) => getSourceFileOfNode(d) === context.enclosingFile));
52998
53076
  serializeSymbolWorker(symbol, isPrivate, propertyAsAlias);
53077
+ context.tracker.popErrorFallbackNode();
52999
53078
  scopeCleanup();
53000
53079
  }
53001
53080
  }
@@ -76950,14 +77029,10 @@ function createTypeChecker(host) {
76950
77029
  function getTypeOfFirstParameterOfSignatureWithFallback(signature, fallbackType) {
76951
77030
  return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType;
76952
77031
  }
76953
- function inferFromAnnotatedParameters(node, contextualSignature, inferenceContext) {
76954
- if (!node.parameters.length) {
76955
- return;
76956
- }
76957
- const len = node.parameters.length - (last(node.parameters).dotDotDotToken ? 1 : 0);
76958
- const thisParameterOffset = first(node.parameters).symbol.escapedName === "this" /* This */ ? 1 : 0;
76959
- for (let i = thisParameterOffset; i < len; i++) {
76960
- const declaration = node.parameters[i];
77032
+ function inferFromAnnotatedParameters(signature, context, inferenceContext) {
77033
+ const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
77034
+ for (let i = 0; i < len; i++) {
77035
+ const declaration = signature.parameters[i].valueDeclaration;
76961
77036
  const typeNode = getEffectiveTypeAnnotationNode(declaration);
76962
77037
  if (typeNode) {
76963
77038
  const source = addOptionality(
@@ -76966,7 +77041,7 @@ function createTypeChecker(host) {
76966
77041
  false,
76967
77042
  isOptionalDeclaration(declaration)
76968
77043
  );
76969
- const target = getTypeAtPosition(contextualSignature, i - thisParameterOffset);
77044
+ const target = getTypeAtPosition(context, i);
76970
77045
  inferTypes(inferenceContext.inferences, source, target);
76971
77046
  }
76972
77047
  }
@@ -77734,12 +77809,6 @@ function createTypeChecker(host) {
77734
77809
  return links.contextFreeType = returnOnlyType;
77735
77810
  }
77736
77811
  }
77737
- if (checkMode & 2 /* Inferential */) {
77738
- const contextualSignature = getContextualSignature(node);
77739
- if (contextualSignature) {
77740
- inferFromAnnotatedParameters(node, contextualSignature, getInferenceContext(node));
77741
- }
77742
- }
77743
77812
  return anyFunctionType;
77744
77813
  }
77745
77814
  const hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
@@ -77764,7 +77833,7 @@ function createTypeChecker(host) {
77764
77833
  const inferenceContext = getInferenceContext(node);
77765
77834
  let instantiatedContextualSignature;
77766
77835
  if (checkMode && checkMode & 2 /* Inferential */) {
77767
- inferFromAnnotatedParameters(node, contextualSignature, inferenceContext);
77836
+ inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);
77768
77837
  const restType = getEffectiveRestType(contextualSignature);
77769
77838
  if (restType && restType.flags & 262144 /* TypeParameter */) {
77770
77839
  instantiatedContextualSignature = instantiateSignature(contextualSignature, inferenceContext.nonFixingMapper);
@@ -77778,7 +77847,7 @@ function createTypeChecker(host) {
77778
77847
  } else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) {
77779
77848
  const inferenceContext = getInferenceContext(node);
77780
77849
  if (checkMode && checkMode & 2 /* Inferential */) {
77781
- inferFromAnnotatedParameters(node, contextualSignature, inferenceContext);
77850
+ inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext);
77782
77851
  }
77783
77852
  }
77784
77853
  if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) {
@@ -89016,6 +89085,14 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl {
89016
89085
  this.inner.reportInferenceFallback(node);
89017
89086
  }
89018
89087
  }
89088
+ pushErrorFallbackNode(node) {
89089
+ var _a, _b;
89090
+ return (_b = (_a = this.inner) == null ? void 0 : _a.pushErrorFallbackNode) == null ? void 0 : _b.call(_a, node);
89091
+ }
89092
+ popErrorFallbackNode() {
89093
+ var _a, _b;
89094
+ return (_b = (_a = this.inner) == null ? void 0 : _a.popErrorFallbackNode) == null ? void 0 : _b.call(_a);
89095
+ }
89019
89096
  };
89020
89097
 
89021
89098
  // src/compiler/visitorPublic.ts
@@ -112172,6 +112249,7 @@ function transformDeclarations(context) {
112172
112249
  let suppressNewDiagnosticContexts;
112173
112250
  const { factory: factory2 } = context;
112174
112251
  const host = context.getEmitHost();
112252
+ let restoreFallbackNode = () => void 0;
112175
112253
  const symbolTracker = {
112176
112254
  trackSymbol,
112177
112255
  reportInaccessibleThisError,
@@ -112183,7 +112261,19 @@ function transformDeclarations(context) {
112183
112261
  moduleResolverHost: host,
112184
112262
  reportNonlocalAugmentation,
112185
112263
  reportNonSerializableProperty,
112186
- reportInferenceFallback
112264
+ reportInferenceFallback,
112265
+ pushErrorFallbackNode(node) {
112266
+ const currentFallback = errorFallbackNode;
112267
+ const currentRestore = restoreFallbackNode;
112268
+ restoreFallbackNode = () => {
112269
+ restoreFallbackNode = currentRestore;
112270
+ errorFallbackNode = currentFallback;
112271
+ };
112272
+ errorFallbackNode = node;
112273
+ },
112274
+ popErrorFallbackNode() {
112275
+ restoreFallbackNode();
112276
+ }
112187
112277
  };
112188
112278
  let errorNameNode;
112189
112279
  let errorFallbackNode;
@@ -2526,6 +2526,7 @@ declare namespace ts {
2526
2526
  ES2021 = "es2021",
2527
2527
  ES2022 = "es2022",
2528
2528
  ES2023 = "es2023",
2529
+ ES2024 = "es2024",
2529
2530
  ESNext = "esnext",
2530
2531
  JSON = "json",
2531
2532
  Latest = "esnext",
@@ -7156,6 +7157,7 @@ declare namespace ts {
7156
7157
  ES2021 = 8,
7157
7158
  ES2022 = 9,
7158
7159
  ES2023 = 10,
7160
+ ES2024 = 11,
7159
7161
  ESNext = 99,
7160
7162
  JSON = 100,
7161
7163
  Latest = 99,