@shopify/cli 3.79.1 → 3.80.0
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.
- package/dist/{chokidar-OATAHMV6.js → chokidar-TTCYG5AA.js} +3 -3
- package/dist/{chokidar-BLUAYFAB.js → chokidar-XUA2BN3J.js} +3 -3
- package/dist/{chunk-XXUOBZLX.js → chunk-2YZW7TJK.js} +3 -3
- package/dist/{chunk-DZ7XZDWD.js → chunk-37WBE3RC.js} +3 -3
- package/dist/{chunk-MW7RWHY5.js → chunk-3GXB4ZRP.js} +4 -4
- package/dist/{chunk-ZMHZBZMW.js → chunk-3MQT2ETC.js} +4 -4
- package/dist/{chunk-ZUCWDIGE.js → chunk-57Q6OQG4.js} +2 -2
- package/dist/{chunk-UTDSSCPI.js → chunk-5AFYDRV4.js} +886 -574
- package/dist/{chunk-IW2W7BT2.js → chunk-6LR4FWOA.js} +3 -3
- package/dist/{chunk-CFWBUC64.js → chunk-7H74TBA2.js} +3 -3
- package/dist/{chunk-B3YWYURY.js → chunk-7IK72W75.js} +3 -3
- package/dist/{chunk-4YS5JU6T.js → chunk-AO63XITX.js} +3 -3
- package/dist/{chunk-QV4LZSZK.js → chunk-AZ6Y4YZT.js} +103 -92
- package/dist/{chunk-3ZBLWNTJ.js → chunk-BUJJ6TMB.js} +4 -4
- package/dist/{chunk-Z5MHHPBU.js → chunk-EDUZEBZD.js} +4 -4
- package/dist/{chunk-MKNQBR63.js → chunk-F43GEFQ6.js} +3 -3
- package/dist/{chunk-EMPP4I5H.js → chunk-F7J5CUMZ.js} +2 -2
- package/dist/{chunk-WZ257YHY.js → chunk-G4BLVBQD.js} +4 -4
- package/dist/{chunk-NBCIERDR.js → chunk-GD4RPFTP.js} +4 -4
- package/dist/{chunk-5B4X6PWS.js → chunk-GFHULNRP.js} +8 -8
- package/dist/{chunk-7ZJSTNNB.js → chunk-GTREEQHM.js} +5 -5
- package/dist/{chunk-ZNGCM64E.js → chunk-H352PF4V.js} +59 -24
- package/dist/{chunk-R65RM3GF.js → chunk-IDQNIJ3J.js} +5 -5
- package/dist/{chunk-PFMD3KQP.js → chunk-JH7IS4YF.js} +2 -2
- package/dist/{chunk-GINKNYRN.js → chunk-JSVOLQ6E.js} +6 -6
- package/dist/{chunk-7BFQPX6U.js → chunk-MMX2XAE3.js} +5 -5
- package/dist/{chunk-IHRJ645Y.js → chunk-MWIL24VU.js} +3 -3
- package/dist/{chunk-JED5Q5EJ.js → chunk-NRK4JPTC.js} +5 -5
- package/dist/{chunk-WMOUKE4L.js → chunk-NWFRDDT5.js} +11 -11
- package/dist/{chunk-GI77RADE.js → chunk-OGBA25HE.js} +3 -3
- package/dist/{chunk-MP5RLDFN.js → chunk-OWRPRJTD.js} +2 -2
- package/dist/{chunk-B67HZYEC.js → chunk-PAKKG4IK.js} +9 -9
- package/dist/{chunk-OP4DJUZ6.js → chunk-PCSYEXIP.js} +6 -6
- package/dist/{chunk-2BQWY5ZH.js → chunk-R3CVGGX7.js} +2 -2
- package/dist/{chunk-2DHJN6XL.js → chunk-REH3UHFP.js} +2 -2
- package/dist/{chunk-KPKJOJKL.js → chunk-S5NF3A56.js} +3 -3
- package/dist/{chunk-L7AFSENO.js → chunk-SUFYMVTC.js} +2 -2
- package/dist/{chunk-JA4N4NXM.js → chunk-TC3YYLZY.js} +4 -4
- package/dist/{chunk-5DBS6QOU.js → chunk-TJM3YBLQ.js} +2 -2
- package/dist/{chunk-QJMVJ2YT.js → chunk-VR4MPAR3.js} +7 -7
- package/dist/{chunk-VTNMKNMC.js → chunk-XYKT7ZUU.js} +2 -2
- package/dist/{chunk-H44KHRQ3.js → chunk-XZ7LRLSW.js} +7 -7
- package/dist/{chunk-73GDKVV2.js → chunk-YPF3IQMR.js} +2 -2
- package/dist/{chunk-Y53XECL6.js → chunk-ZEM3T4UY.js} +1 -7
- package/dist/cli/commands/auth/logout.js +16 -16
- package/dist/cli/commands/auth/logout.test.js +18 -18
- package/dist/cli/commands/cache/clear.js +15 -15
- package/dist/cli/commands/debug/command-flags.js +15 -15
- package/dist/cli/commands/docs/generate.js +15 -15
- package/dist/cli/commands/docs/generate.test.js +16 -16
- package/dist/cli/commands/help.js +15 -15
- package/dist/cli/commands/kitchen-sink/async.js +16 -16
- package/dist/cli/commands/kitchen-sink/async.test.js +17 -17
- package/dist/cli/commands/kitchen-sink/index.js +18 -18
- package/dist/cli/commands/kitchen-sink/index.test.js +19 -19
- package/dist/cli/commands/kitchen-sink/prompts.js +16 -16
- package/dist/cli/commands/kitchen-sink/prompts.test.js +17 -17
- package/dist/cli/commands/kitchen-sink/static.js +16 -16
- package/dist/cli/commands/kitchen-sink/static.test.js +17 -17
- package/dist/cli/commands/notifications/generate.js +16 -16
- package/dist/cli/commands/notifications/list.js +16 -16
- package/dist/cli/commands/search.js +16 -16
- package/dist/cli/commands/upgrade.js +16 -16
- package/dist/cli/commands/upgrade.test.js +1 -1
- package/dist/cli/commands/version.js +16 -16
- package/dist/cli/commands/version.test.js +17 -17
- package/dist/cli/services/commands/notifications.js +11 -11
- package/dist/cli/services/commands/search.js +7 -7
- package/dist/cli/services/commands/search.test.js +8 -8
- package/dist/cli/services/commands/version.js +8 -8
- package/dist/cli/services/commands/version.test.js +10 -10
- package/dist/cli/services/kitchen-sink/async.js +7 -7
- package/dist/cli/services/kitchen-sink/prompts.js +7 -7
- package/dist/cli/services/kitchen-sink/static.js +7 -7
- package/dist/cli/services/upgrade.js +8 -8
- package/dist/cli/services/upgrade.test.js +10 -10
- package/dist/{custom-oclif-loader-MZ3GZ32O.js → custom-oclif-loader-HQIYD7VA.js} +7 -7
- package/dist/data/filters.json +108 -1
- package/dist/data/latest.json +1 -1
- package/dist/data/objects.json +143 -1
- package/dist/data/setting.json +6 -1
- package/dist/data/tags.json +30 -18
- package/dist/{del-2SYBVRHB.js → del-YIU34DZ5.js} +4 -4
- package/dist/{devtools-BA4WST2D.js → devtools-EVCDECOU.js} +2 -2
- package/dist/{devtools-6LOQORRT.js → devtools-J4QAI6HR.js} +2 -2
- package/dist/{error-handler-MTFIQP6U.js → error-handler-BQ3ZQYX7.js} +13 -13
- package/dist/hooks/postrun.js +11 -11
- package/dist/hooks/prerun.js +14 -13
- package/dist/{http-proxy-L3MCJRQS.js → http-proxy-KGLXPNEY.js} +1 -9
- package/dist/index.js +153372 -16081
- package/dist/{lib-MWWAATIC.js → lib-MIBR2T7P.js} +5 -5
- package/dist/{local-34IWAIJY.js → local-F5VFMUS5.js} +7 -7
- package/dist/{morph-MDY3DSJL.js → morph-EB6ON4RE.js} +45 -45
- package/dist/{node-6M2Y6S6K.js → node-NS4BEHX4.js} +17 -17
- package/dist/{node-package-manager-S5BR3SQ7.js → node-package-manager-XTTAGATX.js} +8 -8
- package/dist/out-5KP5WGIK.js +7 -0
- package/dist/{path-GWAZZN2N.js → path-2K5HIMHZ.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-FJ2QLK3P.js → ui-A4PGXQX4.js} +7 -7
- package/dist/{workerd-N5O22HSJ.js → workerd-WQC6GRYP.js} +17 -17
- package/oclif.manifest.json +5 -21
- package/package.json +7 -7
- package/dist/out-AZBX4ITJ.js +0 -7
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
require_globby,
|
|
14
14
|
require_indent_string
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OWRPRJTD.js";
|
|
16
16
|
import {
|
|
17
17
|
__commonJS,
|
|
18
18
|
__require,
|
|
@@ -528,7 +528,7 @@ var require_conversions = __commonJS({
|
|
|
528
528
|
let h = hwb[0] / 360, wh = hwb[1] / 100, bl = hwb[2] / 100, ratio = wh + bl, f;
|
|
529
529
|
ratio > 1 && (wh /= ratio, bl /= ratio);
|
|
530
530
|
let i = Math.floor(6 * h), v = 1 - bl;
|
|
531
|
-
f = 6 * h - i, i & 1 && (f = 1 - f);
|
|
531
|
+
f = 6 * h - i, (i & 1) !== 0 && (f = 1 - f);
|
|
532
532
|
let n = wh + f * (v - wh), r, g, b;
|
|
533
533
|
switch (i) {
|
|
534
534
|
default:
|
|
@@ -2893,9 +2893,9 @@ var require_src = __commonJS({
|
|
|
2893
2893
|
}
|
|
2894
2894
|
});
|
|
2895
2895
|
|
|
2896
|
-
// ../../node_modules/.pnpm/typescript@5.
|
|
2896
|
+
// ../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/typescript.js
|
|
2897
2897
|
var require_typescript = __commonJS({
|
|
2898
|
-
"../../node_modules/.pnpm/typescript@5.
|
|
2898
|
+
"../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/typescript.js"(exports, module) {
|
|
2899
2899
|
init_cjs_shims();
|
|
2900
2900
|
var ts = {};
|
|
2901
2901
|
((module2) => {
|
|
@@ -3310,6 +3310,7 @@ var require_typescript = __commonJS({
|
|
|
3310
3310
|
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
3311
3311
|
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
3312
3312
|
createProgram: () => createProgram,
|
|
3313
|
+
createProgramDiagnostics: () => createProgramDiagnostics,
|
|
3313
3314
|
createProgramHost: () => createProgramHost,
|
|
3314
3315
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
|
3315
3316
|
createQueue: () => createQueue,
|
|
@@ -3479,6 +3480,8 @@ var require_typescript = __commonJS({
|
|
|
3479
3480
|
forEachLeadingCommentRange: () => forEachLeadingCommentRange,
|
|
3480
3481
|
forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft,
|
|
3481
3482
|
forEachNameOfDefaultExport: () => forEachNameOfDefaultExport,
|
|
3483
|
+
forEachOptionsSyntaxByName: () => forEachOptionsSyntaxByName,
|
|
3484
|
+
forEachProjectReference: () => forEachProjectReference,
|
|
3482
3485
|
forEachPropertyAssignment: () => forEachPropertyAssignment,
|
|
3483
3486
|
forEachResolvedProjectReference: () => forEachResolvedProjectReference,
|
|
3484
3487
|
forEachReturnStatement: () => forEachReturnStatement,
|
|
@@ -3718,6 +3721,8 @@ var require_typescript = __commonJS({
|
|
|
3718
3721
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
3719
3722
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
3720
3723
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
3724
|
+
getLibFileNameFromLibReference: () => getLibFileNameFromLibReference,
|
|
3725
|
+
getLibNameFromLibReference: () => getLibNameFromLibReference,
|
|
3721
3726
|
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
3722
3727
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
3723
3728
|
getLineInfo: () => getLineInfo,
|
|
@@ -3790,6 +3795,8 @@ var require_typescript = __commonJS({
|
|
|
3790
3795
|
getOptionFromName: () => getOptionFromName,
|
|
3791
3796
|
getOptionsForLibraryResolution: () => getOptionsForLibraryResolution,
|
|
3792
3797
|
getOptionsNameMap: () => getOptionsNameMap,
|
|
3798
|
+
getOptionsSyntaxByArrayElementValue: () => getOptionsSyntaxByArrayElementValue,
|
|
3799
|
+
getOptionsSyntaxByValue: () => getOptionsSyntaxByValue,
|
|
3793
3800
|
getOrCreateEmitNode: () => getOrCreateEmitNode,
|
|
3794
3801
|
getOrUpdate: () => getOrUpdate,
|
|
3795
3802
|
getOriginalNode: () => getOriginalNode,
|
|
@@ -3826,7 +3833,6 @@ var require_typescript = __commonJS({
|
|
|
3826
3833
|
getPrivateIdentifier: () => getPrivateIdentifier,
|
|
3827
3834
|
getProperties: () => getProperties,
|
|
3828
3835
|
getProperty: () => getProperty,
|
|
3829
|
-
getPropertyArrayElementValue: () => getPropertyArrayElementValue,
|
|
3830
3836
|
getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression,
|
|
3831
3837
|
getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode,
|
|
3832
3838
|
getPropertyNameFromType: () => getPropertyNameFromType,
|
|
@@ -4737,6 +4743,7 @@ var require_typescript = __commonJS({
|
|
|
4737
4743
|
moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,
|
|
4738
4744
|
moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier,
|
|
4739
4745
|
moduleSpecifiers: () => ts_moduleSpecifiers_exports,
|
|
4746
|
+
moduleSupportsImportAttributes: () => moduleSupportsImportAttributes,
|
|
4740
4747
|
moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier,
|
|
4741
4748
|
moveEmitHelpers: () => moveEmitHelpers,
|
|
4742
4749
|
moveRangeEnd: () => moveRangeEnd,
|
|
@@ -5148,7 +5155,7 @@ var require_typescript = __commonJS({
|
|
|
5148
5155
|
writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
|
|
5149
5156
|
zipWith: () => zipWith
|
|
5150
5157
|
}), module2.exports = __toCommonJS(typescript_exports);
|
|
5151
|
-
var versionMajorMinor = "5.
|
|
5158
|
+
var versionMajorMinor = "5.8", version = "5.8.3", Comparison = /* @__PURE__ */ ((Comparison3) => (Comparison3[Comparison3.LessThan = -1] = "LessThan", Comparison3[Comparison3.EqualTo = 0] = "EqualTo", Comparison3[Comparison3.GreaterThan = 1] = "GreaterThan", Comparison3))(Comparison || {}), emptyArray = [], emptyMap = /* @__PURE__ */ new Map();
|
|
5152
5159
|
function length(array) {
|
|
5153
5160
|
return array !== void 0 ? array.length : 0;
|
|
5154
5161
|
}
|
|
@@ -7691,7 +7698,7 @@ ${lanes.join(`
|
|
|
7691
7698
|
let name = DiagnosticCategory[d.category];
|
|
7692
7699
|
return lowerCase ? name.toLowerCase() : name;
|
|
7693
7700
|
}
|
|
7694
|
-
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => (ModuleResolutionKind3[ModuleResolutionKind3.Classic = 1] = "Classic", ModuleResolutionKind3[ModuleResolutionKind3.NodeJs = 2] = "NodeJs", ModuleResolutionKind3[ModuleResolutionKind3.Node10 = 2] = "Node10", ModuleResolutionKind3[ModuleResolutionKind3.Node16 = 3] = "Node16", ModuleResolutionKind3[ModuleResolutionKind3.NodeNext = 99] = "NodeNext", ModuleResolutionKind3[ModuleResolutionKind3.Bundler = 100] = "Bundler", ModuleResolutionKind3))(ModuleResolutionKind || {}), ModuleDetectionKind = /* @__PURE__ */ ((ModuleDetectionKind2) => (ModuleDetectionKind2[ModuleDetectionKind2.Legacy = 1] = "Legacy", ModuleDetectionKind2[ModuleDetectionKind2.Auto = 2] = "Auto", ModuleDetectionKind2[ModuleDetectionKind2.Force = 3] = "Force", ModuleDetectionKind2))(ModuleDetectionKind || {}), WatchFileKind = /* @__PURE__ */ ((WatchFileKind3) => (WatchFileKind3[WatchFileKind3.FixedPollingInterval = 0] = "FixedPollingInterval", WatchFileKind3[WatchFileKind3.PriorityPollingInterval = 1] = "PriorityPollingInterval", WatchFileKind3[WatchFileKind3.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", WatchFileKind3[WatchFileKind3.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", WatchFileKind3[WatchFileKind3.UseFsEvents = 4] = "UseFsEvents", WatchFileKind3[WatchFileKind3.UseFsEventsOnParentDirectory = 5] = "UseFsEventsOnParentDirectory", WatchFileKind3))(WatchFileKind || {}), WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind3) => (WatchDirectoryKind3[WatchDirectoryKind3.UseFsEvents = 0] = "UseFsEvents", WatchDirectoryKind3[WatchDirectoryKind3.FixedPollingInterval = 1] = "FixedPollingInterval", WatchDirectoryKind3[WatchDirectoryKind3.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", WatchDirectoryKind3[WatchDirectoryKind3.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", WatchDirectoryKind3))(WatchDirectoryKind || {}), PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind3) => (PollingWatchKind3[PollingWatchKind3.FixedInterval = 0] = "FixedInterval", PollingWatchKind3[PollingWatchKind3.PriorityInterval = 1] = "PriorityInterval", PollingWatchKind3[PollingWatchKind3.DynamicPriority = 2] = "DynamicPriority", PollingWatchKind3[PollingWatchKind3.FixedChunkSize = 3] = "FixedChunkSize", PollingWatchKind3))(PollingWatchKind || {}), ModuleKind = /* @__PURE__ */ ((ModuleKind3) => (ModuleKind3[ModuleKind3.None = 0] = "None", ModuleKind3[ModuleKind3.CommonJS = 1] = "CommonJS", ModuleKind3[ModuleKind3.AMD = 2] = "AMD", ModuleKind3[ModuleKind3.UMD = 3] = "UMD", ModuleKind3[ModuleKind3.System = 4] = "System", ModuleKind3[ModuleKind3.ES2015 = 5] = "ES2015", ModuleKind3[ModuleKind3.ES2020 = 6] = "ES2020", ModuleKind3[ModuleKind3.ES2022 = 7] = "ES2022", ModuleKind3[ModuleKind3.ESNext = 99] = "ESNext", ModuleKind3[ModuleKind3.Node16 = 100] = "Node16", ModuleKind3[ModuleKind3.NodeNext = 199] = "NodeNext", ModuleKind3[ModuleKind3.Preserve = 200] = "Preserve", ModuleKind3))(ModuleKind || {}), JsxEmit = /* @__PURE__ */ ((JsxEmit3) => (JsxEmit3[JsxEmit3.None = 0] = "None", JsxEmit3[JsxEmit3.Preserve = 1] = "Preserve", JsxEmit3[JsxEmit3.React = 2] = "React", JsxEmit3[JsxEmit3.ReactNative = 3] = "ReactNative", JsxEmit3[JsxEmit3.ReactJSX = 4] = "ReactJSX", JsxEmit3[JsxEmit3.ReactJSXDev = 5] = "ReactJSXDev", JsxEmit3))(JsxEmit || {}), ImportsNotUsedAsValues = /* @__PURE__ */ ((ImportsNotUsedAsValues2) => (ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Remove = 0] = "Remove", ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Preserve = 1] = "Preserve", ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Error = 2] = "Error", ImportsNotUsedAsValues2))(ImportsNotUsedAsValues || {}), NewLineKind = /* @__PURE__ */ ((NewLineKind3) => (NewLineKind3[NewLineKind3.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", NewLineKind3[NewLineKind3.LineFeed = 1] = "LineFeed", NewLineKind3))(NewLineKind || {}), ScriptKind = /* @__PURE__ */ ((ScriptKind7) => (ScriptKind7[ScriptKind7.Unknown = 0] = "Unknown", ScriptKind7[ScriptKind7.JS = 1] = "JS", ScriptKind7[ScriptKind7.JSX = 2] = "JSX", ScriptKind7[ScriptKind7.TS = 3] = "TS", ScriptKind7[ScriptKind7.TSX = 4] = "TSX", ScriptKind7[ScriptKind7.External = 5] = "External", ScriptKind7[ScriptKind7.JSON = 6] = "JSON", ScriptKind7[ScriptKind7.Deferred = 7] = "Deferred", ScriptKind7))(ScriptKind || {}), ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => (ScriptTarget12[ScriptTarget12.ES3 = 0] = "ES3", ScriptTarget12[ScriptTarget12.ES5 = 1] = "ES5", ScriptTarget12[ScriptTarget12.ES2015 = 2] = "ES2015", ScriptTarget12[ScriptTarget12.ES2016 = 3] = "ES2016", ScriptTarget12[ScriptTarget12.ES2017 = 4] = "ES2017", ScriptTarget12[ScriptTarget12.ES2018 = 5] = "ES2018", ScriptTarget12[ScriptTarget12.ES2019 = 6] = "ES2019", ScriptTarget12[ScriptTarget12.ES2020 = 7] = "ES2020", ScriptTarget12[ScriptTarget12.ES2021 = 8] = "ES2021", ScriptTarget12[ScriptTarget12.ES2022 = 9] = "ES2022", ScriptTarget12[ScriptTarget12.ES2023 = 10] = "ES2023", ScriptTarget12[ScriptTarget12.ES2024 = 11] = "ES2024", ScriptTarget12[ScriptTarget12.ESNext = 99] = "ESNext", ScriptTarget12[ScriptTarget12.JSON = 100] = "JSON", ScriptTarget12[
|
|
7701
|
+
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => (ModuleResolutionKind3[ModuleResolutionKind3.Classic = 1] = "Classic", ModuleResolutionKind3[ModuleResolutionKind3.NodeJs = 2] = "NodeJs", ModuleResolutionKind3[ModuleResolutionKind3.Node10 = 2] = "Node10", ModuleResolutionKind3[ModuleResolutionKind3.Node16 = 3] = "Node16", ModuleResolutionKind3[ModuleResolutionKind3.NodeNext = 99] = "NodeNext", ModuleResolutionKind3[ModuleResolutionKind3.Bundler = 100] = "Bundler", ModuleResolutionKind3))(ModuleResolutionKind || {}), ModuleDetectionKind = /* @__PURE__ */ ((ModuleDetectionKind2) => (ModuleDetectionKind2[ModuleDetectionKind2.Legacy = 1] = "Legacy", ModuleDetectionKind2[ModuleDetectionKind2.Auto = 2] = "Auto", ModuleDetectionKind2[ModuleDetectionKind2.Force = 3] = "Force", ModuleDetectionKind2))(ModuleDetectionKind || {}), WatchFileKind = /* @__PURE__ */ ((WatchFileKind3) => (WatchFileKind3[WatchFileKind3.FixedPollingInterval = 0] = "FixedPollingInterval", WatchFileKind3[WatchFileKind3.PriorityPollingInterval = 1] = "PriorityPollingInterval", WatchFileKind3[WatchFileKind3.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", WatchFileKind3[WatchFileKind3.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", WatchFileKind3[WatchFileKind3.UseFsEvents = 4] = "UseFsEvents", WatchFileKind3[WatchFileKind3.UseFsEventsOnParentDirectory = 5] = "UseFsEventsOnParentDirectory", WatchFileKind3))(WatchFileKind || {}), WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind3) => (WatchDirectoryKind3[WatchDirectoryKind3.UseFsEvents = 0] = "UseFsEvents", WatchDirectoryKind3[WatchDirectoryKind3.FixedPollingInterval = 1] = "FixedPollingInterval", WatchDirectoryKind3[WatchDirectoryKind3.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", WatchDirectoryKind3[WatchDirectoryKind3.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", WatchDirectoryKind3))(WatchDirectoryKind || {}), PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind3) => (PollingWatchKind3[PollingWatchKind3.FixedInterval = 0] = "FixedInterval", PollingWatchKind3[PollingWatchKind3.PriorityInterval = 1] = "PriorityInterval", PollingWatchKind3[PollingWatchKind3.DynamicPriority = 2] = "DynamicPriority", PollingWatchKind3[PollingWatchKind3.FixedChunkSize = 3] = "FixedChunkSize", PollingWatchKind3))(PollingWatchKind || {}), ModuleKind = /* @__PURE__ */ ((ModuleKind3) => (ModuleKind3[ModuleKind3.None = 0] = "None", ModuleKind3[ModuleKind3.CommonJS = 1] = "CommonJS", ModuleKind3[ModuleKind3.AMD = 2] = "AMD", ModuleKind3[ModuleKind3.UMD = 3] = "UMD", ModuleKind3[ModuleKind3.System = 4] = "System", ModuleKind3[ModuleKind3.ES2015 = 5] = "ES2015", ModuleKind3[ModuleKind3.ES2020 = 6] = "ES2020", ModuleKind3[ModuleKind3.ES2022 = 7] = "ES2022", ModuleKind3[ModuleKind3.ESNext = 99] = "ESNext", ModuleKind3[ModuleKind3.Node16 = 100] = "Node16", ModuleKind3[ModuleKind3.Node18 = 101] = "Node18", ModuleKind3[ModuleKind3.NodeNext = 199] = "NodeNext", ModuleKind3[ModuleKind3.Preserve = 200] = "Preserve", ModuleKind3))(ModuleKind || {}), JsxEmit = /* @__PURE__ */ ((JsxEmit3) => (JsxEmit3[JsxEmit3.None = 0] = "None", JsxEmit3[JsxEmit3.Preserve = 1] = "Preserve", JsxEmit3[JsxEmit3.React = 2] = "React", JsxEmit3[JsxEmit3.ReactNative = 3] = "ReactNative", JsxEmit3[JsxEmit3.ReactJSX = 4] = "ReactJSX", JsxEmit3[JsxEmit3.ReactJSXDev = 5] = "ReactJSXDev", JsxEmit3))(JsxEmit || {}), ImportsNotUsedAsValues = /* @__PURE__ */ ((ImportsNotUsedAsValues2) => (ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Remove = 0] = "Remove", ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Preserve = 1] = "Preserve", ImportsNotUsedAsValues2[ImportsNotUsedAsValues2.Error = 2] = "Error", ImportsNotUsedAsValues2))(ImportsNotUsedAsValues || {}), NewLineKind = /* @__PURE__ */ ((NewLineKind3) => (NewLineKind3[NewLineKind3.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", NewLineKind3[NewLineKind3.LineFeed = 1] = "LineFeed", NewLineKind3))(NewLineKind || {}), ScriptKind = /* @__PURE__ */ ((ScriptKind7) => (ScriptKind7[ScriptKind7.Unknown = 0] = "Unknown", ScriptKind7[ScriptKind7.JS = 1] = "JS", ScriptKind7[ScriptKind7.JSX = 2] = "JSX", ScriptKind7[ScriptKind7.TS = 3] = "TS", ScriptKind7[ScriptKind7.TSX = 4] = "TSX", ScriptKind7[ScriptKind7.External = 5] = "External", ScriptKind7[ScriptKind7.JSON = 6] = "JSON", ScriptKind7[ScriptKind7.Deferred = 7] = "Deferred", ScriptKind7))(ScriptKind || {}), ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => (ScriptTarget12[ScriptTarget12.ES3 = 0] = "ES3", ScriptTarget12[ScriptTarget12.ES5 = 1] = "ES5", ScriptTarget12[ScriptTarget12.ES2015 = 2] = "ES2015", ScriptTarget12[ScriptTarget12.ES2016 = 3] = "ES2016", ScriptTarget12[ScriptTarget12.ES2017 = 4] = "ES2017", ScriptTarget12[ScriptTarget12.ES2018 = 5] = "ES2018", ScriptTarget12[ScriptTarget12.ES2019 = 6] = "ES2019", ScriptTarget12[ScriptTarget12.ES2020 = 7] = "ES2020", ScriptTarget12[ScriptTarget12.ES2021 = 8] = "ES2021", ScriptTarget12[ScriptTarget12.ES2022 = 9] = "ES2022", ScriptTarget12[ScriptTarget12.ES2023 = 10] = "ES2023", ScriptTarget12[ScriptTarget12.ES2024 = 11] = "ES2024", ScriptTarget12[ScriptTarget12.ESNext = 99] = "ESNext", ScriptTarget12[ScriptTarget12.JSON = 100] = "JSON", ScriptTarget12[
|
|
7695
7702
|
ScriptTarget12.Latest = 99
|
|
7696
7703
|
/* ESNext */
|
|
7697
7704
|
] = "Latest", ScriptTarget12))(ScriptTarget || {}), LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => (LanguageVariant4[LanguageVariant4.Standard = 0] = "Standard", LanguageVariant4[LanguageVariant4.JSX = 1] = "JSX", LanguageVariant4))(LanguageVariant || {}), WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => (WatchDirectoryFlags3[WatchDirectoryFlags3.None = 0] = "None", WatchDirectoryFlags3[WatchDirectoryFlags3.Recursive = 1] = "Recursive", WatchDirectoryFlags3))(WatchDirectoryFlags || {}), CharacterCodes = /* @__PURE__ */ ((CharacterCodes2) => (CharacterCodes2[CharacterCodes2.EOF = -1] = "EOF", CharacterCodes2[CharacterCodes2.nullCharacter = 0] = "nullCharacter", CharacterCodes2[CharacterCodes2.maxAsciiCharacter = 127] = "maxAsciiCharacter", CharacterCodes2[CharacterCodes2.lineFeed = 10] = "lineFeed", CharacterCodes2[CharacterCodes2.carriageReturn = 13] = "carriageReturn", CharacterCodes2[CharacterCodes2.lineSeparator = 8232] = "lineSeparator", CharacterCodes2[CharacterCodes2.paragraphSeparator = 8233] = "paragraphSeparator", CharacterCodes2[CharacterCodes2.nextLine = 133] = "nextLine", CharacterCodes2[CharacterCodes2.space = 32] = "space", CharacterCodes2[CharacterCodes2.nonBreakingSpace = 160] = "nonBreakingSpace", CharacterCodes2[CharacterCodes2.enQuad = 8192] = "enQuad", CharacterCodes2[CharacterCodes2.emQuad = 8193] = "emQuad", CharacterCodes2[CharacterCodes2.enSpace = 8194] = "enSpace", CharacterCodes2[CharacterCodes2.emSpace = 8195] = "emSpace", CharacterCodes2[CharacterCodes2.threePerEmSpace = 8196] = "threePerEmSpace", CharacterCodes2[CharacterCodes2.fourPerEmSpace = 8197] = "fourPerEmSpace", CharacterCodes2[CharacterCodes2.sixPerEmSpace = 8198] = "sixPerEmSpace", CharacterCodes2[CharacterCodes2.figureSpace = 8199] = "figureSpace", CharacterCodes2[CharacterCodes2.punctuationSpace = 8200] = "punctuationSpace", CharacterCodes2[CharacterCodes2.thinSpace = 8201] = "thinSpace", CharacterCodes2[CharacterCodes2.hairSpace = 8202] = "hairSpace", CharacterCodes2[CharacterCodes2.zeroWidthSpace = 8203] = "zeroWidthSpace", CharacterCodes2[CharacterCodes2.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", CharacterCodes2[CharacterCodes2.ideographicSpace = 12288] = "ideographicSpace", CharacterCodes2[CharacterCodes2.mathematicalSpace = 8287] = "mathematicalSpace", CharacterCodes2[CharacterCodes2.ogham = 5760] = "ogham", CharacterCodes2[CharacterCodes2.replacementCharacter = 65533] = "replacementCharacter", CharacterCodes2[CharacterCodes2._ = 95] = "_", CharacterCodes2[CharacterCodes2.$ = 36] = "$", CharacterCodes2[CharacterCodes2._0 = 48] = "_0", CharacterCodes2[CharacterCodes2._1 = 49] = "_1", CharacterCodes2[CharacterCodes2._2 = 50] = "_2", CharacterCodes2[CharacterCodes2._3 = 51] = "_3", CharacterCodes2[CharacterCodes2._4 = 52] = "_4", CharacterCodes2[CharacterCodes2._5 = 53] = "_5", CharacterCodes2[CharacterCodes2._6 = 54] = "_6", CharacterCodes2[CharacterCodes2._7 = 55] = "_7", CharacterCodes2[CharacterCodes2._8 = 56] = "_8", CharacterCodes2[CharacterCodes2._9 = 57] = "_9", CharacterCodes2[CharacterCodes2.a = 97] = "a", CharacterCodes2[CharacterCodes2.b = 98] = "b", CharacterCodes2[CharacterCodes2.c = 99] = "c", CharacterCodes2[CharacterCodes2.d = 100] = "d", CharacterCodes2[CharacterCodes2.e = 101] = "e", CharacterCodes2[CharacterCodes2.f = 102] = "f", CharacterCodes2[CharacterCodes2.g = 103] = "g", CharacterCodes2[CharacterCodes2.h = 104] = "h", CharacterCodes2[CharacterCodes2.i = 105] = "i", CharacterCodes2[CharacterCodes2.j = 106] = "j", CharacterCodes2[CharacterCodes2.k = 107] = "k", CharacterCodes2[CharacterCodes2.l = 108] = "l", CharacterCodes2[CharacterCodes2.m = 109] = "m", CharacterCodes2[CharacterCodes2.n = 110] = "n", CharacterCodes2[CharacterCodes2.o = 111] = "o", CharacterCodes2[CharacterCodes2.p = 112] = "p", CharacterCodes2[CharacterCodes2.q = 113] = "q", CharacterCodes2[CharacterCodes2.r = 114] = "r", CharacterCodes2[CharacterCodes2.s = 115] = "s", CharacterCodes2[CharacterCodes2.t = 116] = "t", CharacterCodes2[CharacterCodes2.u = 117] = "u", CharacterCodes2[CharacterCodes2.v = 118] = "v", CharacterCodes2[CharacterCodes2.w = 119] = "w", CharacterCodes2[CharacterCodes2.x = 120] = "x", CharacterCodes2[CharacterCodes2.y = 121] = "y", CharacterCodes2[CharacterCodes2.z = 122] = "z", CharacterCodes2[CharacterCodes2.A = 65] = "A", CharacterCodes2[CharacterCodes2.B = 66] = "B", CharacterCodes2[CharacterCodes2.C = 67] = "C", CharacterCodes2[CharacterCodes2.D = 68] = "D", CharacterCodes2[CharacterCodes2.E = 69] = "E", CharacterCodes2[CharacterCodes2.F = 70] = "F", CharacterCodes2[CharacterCodes2.G = 71] = "G", CharacterCodes2[CharacterCodes2.H = 72] = "H", CharacterCodes2[CharacterCodes2.I = 73] = "I", CharacterCodes2[CharacterCodes2.J = 74] = "J", CharacterCodes2[CharacterCodes2.K = 75] = "K", CharacterCodes2[CharacterCodes2.L = 76] = "L", CharacterCodes2[CharacterCodes2.M = 77] = "M", CharacterCodes2[CharacterCodes2.N = 78] = "N", CharacterCodes2[CharacterCodes2.O = 79] = "O", CharacterCodes2[CharacterCodes2.P = 80] = "P", CharacterCodes2[CharacterCodes2.Q = 81] = "Q", CharacterCodes2[CharacterCodes2.R = 82] = "R", CharacterCodes2[CharacterCodes2.S = 83] = "S", CharacterCodes2[CharacterCodes2.T = 84] = "T", CharacterCodes2[CharacterCodes2.U = 85] = "U", CharacterCodes2[CharacterCodes2.V = 86] = "V", CharacterCodes2[CharacterCodes2.W = 87] = "W", CharacterCodes2[CharacterCodes2.X = 88] = "X", CharacterCodes2[CharacterCodes2.Y = 89] = "Y", CharacterCodes2[CharacterCodes2.Z = 90] = "Z", CharacterCodes2[CharacterCodes2.ampersand = 38] = "ampersand", CharacterCodes2[CharacterCodes2.asterisk = 42] = "asterisk", CharacterCodes2[CharacterCodes2.at = 64] = "at", CharacterCodes2[CharacterCodes2.backslash = 92] = "backslash", CharacterCodes2[CharacterCodes2.backtick = 96] = "backtick", CharacterCodes2[CharacterCodes2.bar = 124] = "bar", CharacterCodes2[CharacterCodes2.caret = 94] = "caret", CharacterCodes2[CharacterCodes2.closeBrace = 125] = "closeBrace", CharacterCodes2[CharacterCodes2.closeBracket = 93] = "closeBracket", CharacterCodes2[CharacterCodes2.closeParen = 41] = "closeParen", CharacterCodes2[CharacterCodes2.colon = 58] = "colon", CharacterCodes2[CharacterCodes2.comma = 44] = "comma", CharacterCodes2[CharacterCodes2.dot = 46] = "dot", CharacterCodes2[CharacterCodes2.doubleQuote = 34] = "doubleQuote", CharacterCodes2[CharacterCodes2.equals = 61] = "equals", CharacterCodes2[CharacterCodes2.exclamation = 33] = "exclamation", CharacterCodes2[CharacterCodes2.greaterThan = 62] = "greaterThan", CharacterCodes2[CharacterCodes2.hash = 35] = "hash", CharacterCodes2[CharacterCodes2.lessThan = 60] = "lessThan", CharacterCodes2[CharacterCodes2.minus = 45] = "minus", CharacterCodes2[CharacterCodes2.openBrace = 123] = "openBrace", CharacterCodes2[CharacterCodes2.openBracket = 91] = "openBracket", CharacterCodes2[CharacterCodes2.openParen = 40] = "openParen", CharacterCodes2[CharacterCodes2.percent = 37] = "percent", CharacterCodes2[CharacterCodes2.plus = 43] = "plus", CharacterCodes2[CharacterCodes2.question = 63] = "question", CharacterCodes2[CharacterCodes2.semicolon = 59] = "semicolon", CharacterCodes2[CharacterCodes2.singleQuote = 39] = "singleQuote", CharacterCodes2[CharacterCodes2.slash = 47] = "slash", CharacterCodes2[CharacterCodes2.tilde = 126] = "tilde", CharacterCodes2[CharacterCodes2.backspace = 8] = "backspace", CharacterCodes2[CharacterCodes2.formFeed = 12] = "formFeed", CharacterCodes2[CharacterCodes2.byteOrderMark = 65279] = "byteOrderMark", CharacterCodes2[CharacterCodes2.tab = 9] = "tab", CharacterCodes2[CharacterCodes2.verticalTab = 11] = "verticalTab", CharacterCodes2))(CharacterCodes || {}), Extension = /* @__PURE__ */ ((Extension2) => (Extension2.Ts = ".ts", Extension2.Tsx = ".tsx", Extension2.Dts = ".d.ts", Extension2.Js = ".js", Extension2.Jsx = ".jsx", Extension2.Json = ".json", Extension2.TsBuildInfo = ".tsbuildinfo", Extension2.Mjs = ".mjs", Extension2.Mts = ".mts", Extension2.Dmts = ".d.mts", Extension2.Cjs = ".cjs", Extension2.Cts = ".cts", Extension2.Dcts = ".d.cts", Extension2))(Extension || {}), TransformFlags = /* @__PURE__ */ ((TransformFlags3) => (TransformFlags3[TransformFlags3.None = 0] = "None", TransformFlags3[TransformFlags3.ContainsTypeScript = 1] = "ContainsTypeScript", TransformFlags3[TransformFlags3.ContainsJsx = 2] = "ContainsJsx", TransformFlags3[TransformFlags3.ContainsESNext = 4] = "ContainsESNext", TransformFlags3[TransformFlags3.ContainsES2022 = 8] = "ContainsES2022", TransformFlags3[TransformFlags3.ContainsES2021 = 16] = "ContainsES2021", TransformFlags3[TransformFlags3.ContainsES2020 = 32] = "ContainsES2020", TransformFlags3[TransformFlags3.ContainsES2019 = 64] = "ContainsES2019", TransformFlags3[TransformFlags3.ContainsES2018 = 128] = "ContainsES2018", TransformFlags3[TransformFlags3.ContainsES2017 = 256] = "ContainsES2017", TransformFlags3[TransformFlags3.ContainsES2016 = 512] = "ContainsES2016", TransformFlags3[TransformFlags3.ContainsES2015 = 1024] = "ContainsES2015", TransformFlags3[TransformFlags3.ContainsGenerator = 2048] = "ContainsGenerator", TransformFlags3[TransformFlags3.ContainsDestructuringAssignment = 4096] = "ContainsDestructuringAssignment", TransformFlags3[TransformFlags3.ContainsTypeScriptClassSyntax = 8192] = "ContainsTypeScriptClassSyntax", TransformFlags3[TransformFlags3.ContainsLexicalThis = 16384] = "ContainsLexicalThis", TransformFlags3[TransformFlags3.ContainsRestOrSpread = 32768] = "ContainsRestOrSpread", TransformFlags3[TransformFlags3.ContainsObjectRestOrSpread = 65536] = "ContainsObjectRestOrSpread", TransformFlags3[TransformFlags3.ContainsComputedPropertyName = 131072] = "ContainsComputedPropertyName", TransformFlags3[TransformFlags3.ContainsBlockScopedBinding = 262144] = "ContainsBlockScopedBinding", TransformFlags3[TransformFlags3.ContainsBindingPattern = 524288] = "ContainsBindingPattern", TransformFlags3[TransformFlags3.ContainsYield = 1048576] = "ContainsYield", TransformFlags3[TransformFlags3.ContainsAwait = 2097152] = "ContainsAwait", TransformFlags3[TransformFlags3.ContainsHoistedDeclarationOrCompletion = 4194304] = "ContainsHoistedDeclarationOrCompletion", TransformFlags3[TransformFlags3.ContainsDynamicImport = 8388608] = "ContainsDynamicImport", TransformFlags3[TransformFlags3.ContainsClassFields = 16777216] = "ContainsClassFields", TransformFlags3[TransformFlags3.ContainsDecorators = 33554432] = "ContainsDecorators", TransformFlags3[TransformFlags3.ContainsPossibleTopLevelAwait = 67108864] = "ContainsPossibleTopLevelAwait", TransformFlags3[TransformFlags3.ContainsLexicalSuper = 134217728] = "ContainsLexicalSuper", TransformFlags3[TransformFlags3.ContainsUpdateExpressionForIdentifier = 268435456] = "ContainsUpdateExpressionForIdentifier", TransformFlags3[TransformFlags3.ContainsPrivateIdentifierInExpression = 536870912] = "ContainsPrivateIdentifierInExpression", TransformFlags3[TransformFlags3.HasComputedFlags = -2147483648] = "HasComputedFlags", TransformFlags3[
|
|
@@ -7796,7 +7803,7 @@ ${lanes.join(`
|
|
|
7796
7803
|
] = "ForOfIncludes", ExternalEmitHelpers2[
|
|
7797
7804
|
ExternalEmitHelpers2.ForAwaitOfIncludes = 16384
|
|
7798
7805
|
/* AsyncValues */
|
|
7799
|
-
] = "ForAwaitOfIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.AsyncGeneratorIncludes = 6144] = "AsyncGeneratorIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.AsyncDelegatorIncludes = 26624] = "AsyncDelegatorIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.SpreadIncludes = 1536] = "SpreadIncludes", ExternalEmitHelpers2))(ExternalEmitHelpers || {}), EmitHint = /* @__PURE__ */ ((EmitHint5) => (EmitHint5[EmitHint5.SourceFile = 0] = "SourceFile", EmitHint5[EmitHint5.Expression = 1] = "Expression", EmitHint5[EmitHint5.IdentifierName = 2] = "IdentifierName", EmitHint5[EmitHint5.MappedTypeParameter = 3] = "MappedTypeParameter", EmitHint5[EmitHint5.Unspecified = 4] = "Unspecified", EmitHint5[EmitHint5.EmbeddedStatement = 5] = "EmbeddedStatement", EmitHint5[EmitHint5.JsxAttributeValue = 6] = "JsxAttributeValue", EmitHint5[EmitHint5.ImportTypeNodeAttributes = 7] = "ImportTypeNodeAttributes", EmitHint5))(EmitHint || {}), OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => (OuterExpressionKinds2[OuterExpressionKinds2.Parentheses = 1] = "Parentheses", OuterExpressionKinds2[OuterExpressionKinds2.TypeAssertions = 2] = "TypeAssertions", OuterExpressionKinds2[OuterExpressionKinds2.NonNullAssertions = 4] = "NonNullAssertions", OuterExpressionKinds2[OuterExpressionKinds2.PartiallyEmittedExpressions = 8] = "PartiallyEmittedExpressions", OuterExpressionKinds2[OuterExpressionKinds2.ExpressionsWithTypeArguments = 16] = "ExpressionsWithTypeArguments", OuterExpressionKinds2[OuterExpressionKinds2.Assertions =
|
|
7806
|
+
] = "ForAwaitOfIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.AsyncGeneratorIncludes = 6144] = "AsyncGeneratorIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.AsyncDelegatorIncludes = 26624] = "AsyncDelegatorIncludes", ExternalEmitHelpers2[ExternalEmitHelpers2.SpreadIncludes = 1536] = "SpreadIncludes", ExternalEmitHelpers2))(ExternalEmitHelpers || {}), EmitHint = /* @__PURE__ */ ((EmitHint5) => (EmitHint5[EmitHint5.SourceFile = 0] = "SourceFile", EmitHint5[EmitHint5.Expression = 1] = "Expression", EmitHint5[EmitHint5.IdentifierName = 2] = "IdentifierName", EmitHint5[EmitHint5.MappedTypeParameter = 3] = "MappedTypeParameter", EmitHint5[EmitHint5.Unspecified = 4] = "Unspecified", EmitHint5[EmitHint5.EmbeddedStatement = 5] = "EmbeddedStatement", EmitHint5[EmitHint5.JsxAttributeValue = 6] = "JsxAttributeValue", EmitHint5[EmitHint5.ImportTypeNodeAttributes = 7] = "ImportTypeNodeAttributes", EmitHint5))(EmitHint || {}), OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => (OuterExpressionKinds2[OuterExpressionKinds2.Parentheses = 1] = "Parentheses", OuterExpressionKinds2[OuterExpressionKinds2.TypeAssertions = 2] = "TypeAssertions", OuterExpressionKinds2[OuterExpressionKinds2.NonNullAssertions = 4] = "NonNullAssertions", OuterExpressionKinds2[OuterExpressionKinds2.PartiallyEmittedExpressions = 8] = "PartiallyEmittedExpressions", OuterExpressionKinds2[OuterExpressionKinds2.ExpressionsWithTypeArguments = 16] = "ExpressionsWithTypeArguments", OuterExpressionKinds2[OuterExpressionKinds2.Satisfies = 32] = "Satisfies", OuterExpressionKinds2[OuterExpressionKinds2.Assertions = 38] = "Assertions", OuterExpressionKinds2[OuterExpressionKinds2.All = 63] = "All", OuterExpressionKinds2[OuterExpressionKinds2.ExcludeJSDocTypeAssertion = -2147483648] = "ExcludeJSDocTypeAssertion", OuterExpressionKinds2))(OuterExpressionKinds || {}), LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => (LexicalEnvironmentFlags2[LexicalEnvironmentFlags2.None = 0] = "None", LexicalEnvironmentFlags2[LexicalEnvironmentFlags2.InParameters = 1] = "InParameters", LexicalEnvironmentFlags2[LexicalEnvironmentFlags2.VariablesHoistedInParameters = 2] = "VariablesHoistedInParameters", LexicalEnvironmentFlags2))(LexicalEnvironmentFlags || {}), ListFormat = /* @__PURE__ */ ((ListFormat2) => (ListFormat2[ListFormat2.None = 0] = "None", ListFormat2[ListFormat2.SingleLine = 0] = "SingleLine", ListFormat2[ListFormat2.MultiLine = 1] = "MultiLine", ListFormat2[ListFormat2.PreserveLines = 2] = "PreserveLines", ListFormat2[ListFormat2.LinesMask = 3] = "LinesMask", ListFormat2[ListFormat2.NotDelimited = 0] = "NotDelimited", ListFormat2[ListFormat2.BarDelimited = 4] = "BarDelimited", ListFormat2[ListFormat2.AmpersandDelimited = 8] = "AmpersandDelimited", ListFormat2[ListFormat2.CommaDelimited = 16] = "CommaDelimited", ListFormat2[ListFormat2.AsteriskDelimited = 32] = "AsteriskDelimited", ListFormat2[ListFormat2.DelimitersMask = 60] = "DelimitersMask", ListFormat2[ListFormat2.AllowTrailingComma = 64] = "AllowTrailingComma", ListFormat2[ListFormat2.Indented = 128] = "Indented", ListFormat2[ListFormat2.SpaceBetweenBraces = 256] = "SpaceBetweenBraces", ListFormat2[ListFormat2.SpaceBetweenSiblings = 512] = "SpaceBetweenSiblings", ListFormat2[ListFormat2.Braces = 1024] = "Braces", ListFormat2[ListFormat2.Parenthesis = 2048] = "Parenthesis", ListFormat2[ListFormat2.AngleBrackets = 4096] = "AngleBrackets", ListFormat2[ListFormat2.SquareBrackets = 8192] = "SquareBrackets", ListFormat2[ListFormat2.BracketsMask = 15360] = "BracketsMask", ListFormat2[ListFormat2.OptionalIfUndefined = 16384] = "OptionalIfUndefined", ListFormat2[ListFormat2.OptionalIfEmpty = 32768] = "OptionalIfEmpty", ListFormat2[ListFormat2.Optional = 49152] = "Optional", ListFormat2[ListFormat2.PreferNewLine = 65536] = "PreferNewLine", ListFormat2[ListFormat2.NoTrailingNewLine = 131072] = "NoTrailingNewLine", ListFormat2[ListFormat2.NoInterveningComments = 262144] = "NoInterveningComments", ListFormat2[ListFormat2.NoSpaceIfEmpty = 524288] = "NoSpaceIfEmpty", ListFormat2[ListFormat2.SingleElement = 1048576] = "SingleElement", ListFormat2[ListFormat2.SpaceAfterList = 2097152] = "SpaceAfterList", ListFormat2[ListFormat2.Modifiers = 2359808] = "Modifiers", ListFormat2[ListFormat2.HeritageClauses = 512] = "HeritageClauses", ListFormat2[ListFormat2.SingleLineTypeLiteralMembers = 768] = "SingleLineTypeLiteralMembers", ListFormat2[ListFormat2.MultiLineTypeLiteralMembers = 32897] = "MultiLineTypeLiteralMembers", ListFormat2[ListFormat2.SingleLineTupleTypeElements = 528] = "SingleLineTupleTypeElements", ListFormat2[ListFormat2.MultiLineTupleTypeElements = 657] = "MultiLineTupleTypeElements", ListFormat2[ListFormat2.UnionTypeConstituents = 516] = "UnionTypeConstituents", ListFormat2[ListFormat2.IntersectionTypeConstituents = 520] = "IntersectionTypeConstituents", ListFormat2[ListFormat2.ObjectBindingPatternElements = 525136] = "ObjectBindingPatternElements", ListFormat2[ListFormat2.ArrayBindingPatternElements = 524880] = "ArrayBindingPatternElements", ListFormat2[ListFormat2.ObjectLiteralExpressionProperties = 526226] = "ObjectLiteralExpressionProperties", ListFormat2[ListFormat2.ImportAttributes = 526226] = "ImportAttributes", ListFormat2[
|
|
7800
7807
|
ListFormat2.ImportClauseEntries = 526226
|
|
7801
7808
|
/* ImportAttributes */
|
|
7802
7809
|
] = "ImportClauseEntries", ListFormat2[ListFormat2.ArrayLiteralExpressionElements = 8914] = "ArrayLiteralExpressionElements", ListFormat2[ListFormat2.CommaListElements = 528] = "CommaListElements", ListFormat2[ListFormat2.CallExpressionArguments = 2576] = "CallExpressionArguments", ListFormat2[ListFormat2.NewExpressionArguments = 18960] = "NewExpressionArguments", ListFormat2[ListFormat2.TemplateExpressionSpans = 262144] = "TemplateExpressionSpans", ListFormat2[ListFormat2.SingleLineBlockStatements = 768] = "SingleLineBlockStatements", ListFormat2[ListFormat2.MultiLineBlockStatements = 129] = "MultiLineBlockStatements", ListFormat2[ListFormat2.VariableDeclarationList = 528] = "VariableDeclarationList", ListFormat2[ListFormat2.SingleLineFunctionBodyStatements = 768] = "SingleLineFunctionBodyStatements", ListFormat2[
|
|
@@ -9085,17 +9092,49 @@ ${lanes.join(`
|
|
|
9085
9092
|
function getNormalizedPathComponents(path, currentDirectory) {
|
|
9086
9093
|
return reducePathComponents(getPathComponents(path, currentDirectory));
|
|
9087
9094
|
}
|
|
9088
|
-
function getNormalizedAbsolutePath(
|
|
9089
|
-
|
|
9095
|
+
function getNormalizedAbsolutePath(path, currentDirectory) {
|
|
9096
|
+
let rootLength = getRootLength(path);
|
|
9097
|
+
rootLength === 0 && currentDirectory ? (path = combinePaths(currentDirectory, path), rootLength = getRootLength(path)) : path = normalizeSlashes(path);
|
|
9098
|
+
let simpleNormalized = simpleNormalizePath(path);
|
|
9099
|
+
if (simpleNormalized !== void 0)
|
|
9100
|
+
return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
|
|
9101
|
+
let length2 = path.length, root = path.substring(0, rootLength), normalized, index = rootLength, segmentStart = index, normalizedUpTo = index, seenNonDotDotSegment = rootLength !== 0;
|
|
9102
|
+
for (; index < length2; ) {
|
|
9103
|
+
segmentStart = index;
|
|
9104
|
+
let ch = path.charCodeAt(index);
|
|
9105
|
+
for (; ch === 47 && index + 1 < length2; )
|
|
9106
|
+
index++, ch = path.charCodeAt(index);
|
|
9107
|
+
index > segmentStart && (normalized ?? (normalized = path.substring(0, segmentStart - 1)), segmentStart = index);
|
|
9108
|
+
let segmentEnd = path.indexOf(directorySeparator, index + 1);
|
|
9109
|
+
segmentEnd === -1 && (segmentEnd = length2);
|
|
9110
|
+
let segmentLength = segmentEnd - segmentStart;
|
|
9111
|
+
if (segmentLength === 1 && path.charCodeAt(index) === 46)
|
|
9112
|
+
normalized ?? (normalized = path.substring(0, normalizedUpTo));
|
|
9113
|
+
else if (segmentLength === 2 && path.charCodeAt(index) === 46 && path.charCodeAt(index + 1) === 46)
|
|
9114
|
+
if (!seenNonDotDotSegment)
|
|
9115
|
+
normalized !== void 0 ? normalized += normalized.length === rootLength ? ".." : "/.." : normalizedUpTo = index + 2;
|
|
9116
|
+
else if (normalized === void 0)
|
|
9117
|
+
normalizedUpTo - 2 >= 0 ? normalized = path.substring(0, Math.max(rootLength, path.lastIndexOf(directorySeparator, normalizedUpTo - 2))) : normalized = path.substring(0, normalizedUpTo);
|
|
9118
|
+
else {
|
|
9119
|
+
let lastSlash = normalized.lastIndexOf(directorySeparator);
|
|
9120
|
+
lastSlash !== -1 ? normalized = normalized.substring(0, Math.max(rootLength, lastSlash)) : normalized = root, normalized.length === rootLength && (seenNonDotDotSegment = rootLength !== 0);
|
|
9121
|
+
}
|
|
9122
|
+
else normalized !== void 0 ? (normalized.length !== rootLength && (normalized += directorySeparator), seenNonDotDotSegment = !0, normalized += path.substring(segmentStart, segmentEnd)) : (seenNonDotDotSegment = !0, normalizedUpTo = segmentEnd);
|
|
9123
|
+
index = segmentEnd + 1;
|
|
9124
|
+
}
|
|
9125
|
+
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path) : path);
|
|
9090
9126
|
}
|
|
9091
9127
|
function normalizePath(path) {
|
|
9092
|
-
|
|
9128
|
+
path = normalizeSlashes(path);
|
|
9129
|
+
let normalized = simpleNormalizePath(path);
|
|
9130
|
+
return normalized !== void 0 ? normalized : (normalized = getNormalizedAbsolutePath(path, ""), normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized);
|
|
9131
|
+
}
|
|
9132
|
+
function simpleNormalizePath(path) {
|
|
9133
|
+
if (!relativePathSegmentRegExp.test(path))
|
|
9093
9134
|
return path;
|
|
9094
|
-
let simplified = path.replace(/\/\.\//g, "/")
|
|
9095
|
-
if (simplified !== path && (path = simplified, !relativePathSegmentRegExp.test(path)))
|
|
9135
|
+
let simplified = path.replace(/\/\.\//g, "/");
|
|
9136
|
+
if (simplified.startsWith("./") && (simplified = simplified.slice(2)), simplified !== path && (path = simplified, !relativePathSegmentRegExp.test(path)))
|
|
9096
9137
|
return path;
|
|
9097
|
-
let normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path)));
|
|
9098
|
-
return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized;
|
|
9099
9138
|
}
|
|
9100
9139
|
function getPathWithoutRoot(pathComponents2) {
|
|
9101
9140
|
return pathComponents2.length === 0 ? "" : pathComponents2.slice(1).join(directorySeparator);
|
|
@@ -9473,6 +9512,7 @@ ${lanes.join(`
|
|
|
9473
9512
|
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
9474
9513
|
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
9475
9514
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),
|
|
9515
|
+
This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled: diag(1294, 1, "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."),
|
|
9476
9516
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
9477
9517
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
|
|
9478
9518
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
|
|
@@ -9487,8 +9527,8 @@ ${lanes.join(`
|
|
|
9487
9527
|
Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, 1, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
9488
9528
|
Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, 1, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
|
|
9489
9529
|
Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, 1, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
9490
|
-
|
|
9491
|
-
|
|
9530
|
+
Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext: diag(1323, 1, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'."),
|
|
9531
|
+
Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_nodenext_or_preserve: diag(1324, 1, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'."),
|
|
9492
9532
|
Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, 1, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
|
|
9493
9533
|
This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, 1, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),
|
|
9494
9534
|
String_literal_with_double_quotes_expected: diag(1327, 1, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
|
|
@@ -9505,7 +9545,7 @@ ${lanes.join(`
|
|
|
9505
9545
|
Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, 1, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
|
|
9506
9546
|
Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
|
|
9507
9547
|
Class_constructor_may_not_be_an_accessor: diag(1341, 1, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
|
|
9508
|
-
|
|
9548
|
+
The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_or_nodenext: diag(1343, 1, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'."),
|
|
9509
9549
|
A_label_is_not_allowed_here: diag(1344, 1, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
|
|
9510
9550
|
An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
|
|
9511
9551
|
This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
|
|
@@ -9535,7 +9575,7 @@ ${lanes.join(`
|
|
|
9535
9575
|
await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, 1, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
9536
9576
|
_0_was_imported_here: diag(1376, 3, "_0_was_imported_here_1376", "'{0}' was imported here."),
|
|
9537
9577
|
_0_was_exported_here: diag(1377, 3, "_0_was_exported_here_1377", "'{0}' was exported here."),
|
|
9538
|
-
|
|
9578
|
+
Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
9539
9579
|
An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
|
|
9540
9580
|
An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, 1, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
|
|
9541
9581
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, 1, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
@@ -9586,7 +9626,7 @@ ${lanes.join(`
|
|
|
9586
9626
|
File_redirects_to_file_0: diag(1429, 3, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
|
|
9587
9627
|
The_file_is_in_the_program_because_Colon: diag(1430, 3, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
|
|
9588
9628
|
for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, 1, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
9589
|
-
|
|
9629
|
+
Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
9590
9630
|
Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."),
|
|
9591
9631
|
Unexpected_keyword_or_identifier: diag(1434, 1, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
|
|
9592
9632
|
Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
|
|
@@ -10228,9 +10268,9 @@ ${lanes.join(`
|
|
|
10228
10268
|
Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
|
|
10229
10269
|
Namespace_name_cannot_be_0: diag(2819, 1, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."),
|
|
10230
10270
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
10231
|
-
|
|
10271
|
+
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve: diag(2821, 1, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_pres_2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'."),
|
|
10232
10272
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
10233
|
-
|
|
10273
|
+
Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve: diag(2823, 1, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_pres_2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'."),
|
|
10234
10274
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
10235
10275
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),
|
|
10236
10276
|
Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),
|
|
@@ -10250,7 +10290,7 @@ ${lanes.join(`
|
|
|
10250
10290
|
The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),
|
|
10251
10291
|
await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."),
|
|
10252
10292
|
await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(2853, 1, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
|
|
10253
|
-
|
|
10293
|
+
Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."),
|
|
10254
10294
|
Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."),
|
|
10255
10295
|
Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),
|
|
10256
10296
|
Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."),
|
|
@@ -10276,6 +10316,7 @@ ${lanes.join(`
|
|
|
10276
10316
|
This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: diag(2877, 1, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."),
|
|
10277
10317
|
This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: diag(2878, 1, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."),
|
|
10278
10318
|
Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: diag(2879, 1, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."),
|
|
10319
|
+
Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert: diag(2880, 1, "Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert_2880", "Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'."),
|
|
10279
10320
|
Import_declaration_0_is_using_private_name_1: diag(4e3, 1, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
10280
10321
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
10281
10322
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -10385,6 +10426,8 @@ ${lanes.join(`
|
|
|
10385
10426
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
10386
10427
|
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
10387
10428
|
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
10429
|
+
This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic: diag(4127, 1, "This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic_4127", "This member cannot have an 'override' modifier because its name is dynamic."),
|
|
10430
|
+
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic: diag(4128, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic_4128", "This member cannot have a JSDoc comment with an '@override' tag because its name is dynamic."),
|
|
10388
10431
|
The_current_host_does_not_support_the_0_option: diag(5001, 1, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
10389
10432
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
10390
10433
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -10957,11 +11000,13 @@ ${lanes.join(`
|
|
|
10957
11000
|
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
|
|
10958
11001
|
Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: diag(6719, 3, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."),
|
|
10959
11002
|
Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any: diag(6720, 3, "Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720", "Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."),
|
|
11003
|
+
Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript: diag(6721, 3, "Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript_6721", "Do not allow runtime constructs that are not part of ECMAScript."),
|
|
10960
11004
|
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
10961
11005
|
Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
|
|
10962
11006
|
Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: diag(6805, 3, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."),
|
|
10963
11007
|
Check_side_effect_imports: diag(6806, 3, "Check_side_effect_imports_6806", "Check side effect imports."),
|
|
10964
11008
|
This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."),
|
|
11009
|
+
Enable_lib_replacement: diag(6808, 3, "Enable_lib_replacement_6808", "Enable lib replacement."),
|
|
10965
11010
|
one_of_Colon: diag(6900, 3, "one_of_Colon_6900", "one of:"),
|
|
10966
11011
|
one_or_more_Colon: diag(6901, 3, "one_or_more_Colon_6901", "one or more:"),
|
|
10967
11012
|
type_Colon: diag(6902, 3, "type_Colon_6902", "type:"),
|
|
@@ -12547,7 +12592,7 @@ ${lanes.join(`
|
|
|
12547
12592
|
return pos += 2, token = 67;
|
|
12548
12593
|
if (charCodeUnchecked(pos + 1) === 42)
|
|
12549
12594
|
return charCodeUnchecked(pos + 2) === 61 ? (pos += 3, token = 68) : (pos += 2, token = 43);
|
|
12550
|
-
if (pos++, skipJsDocLeadingAsterisks &&
|
|
12595
|
+
if (pos++, skipJsDocLeadingAsterisks && (tokenFlags & 32768) === 0 && tokenFlags & 1) {
|
|
12551
12596
|
tokenFlags |= 32768;
|
|
12552
12597
|
continue;
|
|
12553
12598
|
}
|
|
@@ -15348,7 +15393,7 @@ ${lanes.join(`
|
|
|
15348
15393
|
return aggregateChildData(node), (node.flags & 1048576) !== 0;
|
|
15349
15394
|
}
|
|
15350
15395
|
function aggregateChildData(node) {
|
|
15351
|
-
node.flags & 2097152 || ((node.flags & 262144 || forEachChild(node, containsParseError)) && (node.flags |= 1048576), node.flags |= 2097152);
|
|
15396
|
+
node.flags & 2097152 || (((node.flags & 262144) !== 0 || forEachChild(node, containsParseError)) && (node.flags |= 1048576), node.flags |= 2097152);
|
|
15352
15397
|
}
|
|
15353
15398
|
function getSourceFileOfNode(node) {
|
|
15354
15399
|
for (; node && node.kind !== 307; )
|
|
@@ -15720,6 +15765,9 @@ ${lanes.join(`
|
|
|
15720
15765
|
"trunc",
|
|
15721
15766
|
"fround",
|
|
15722
15767
|
"cbrt"
|
|
15768
|
+
],
|
|
15769
|
+
esnext: [
|
|
15770
|
+
"f16round"
|
|
15723
15771
|
]
|
|
15724
15772
|
})),
|
|
15725
15773
|
Map: new Map(Object.entries({
|
|
@@ -15889,6 +15937,10 @@ ${lanes.join(`
|
|
|
15889
15937
|
"setBigUint64",
|
|
15890
15938
|
"getBigInt64",
|
|
15891
15939
|
"getBigUint64"
|
|
15940
|
+
],
|
|
15941
|
+
esnext: [
|
|
15942
|
+
"setFloat16",
|
|
15943
|
+
"getFloat16"
|
|
15892
15944
|
]
|
|
15893
15945
|
})),
|
|
15894
15946
|
BigInt: new Map(Object.entries({
|
|
@@ -15992,6 +16044,9 @@ ${lanes.join(`
|
|
|
15992
16044
|
"with"
|
|
15993
16045
|
]
|
|
15994
16046
|
})),
|
|
16047
|
+
Float16Array: new Map(Object.entries({
|
|
16048
|
+
esnext: emptyArray
|
|
16049
|
+
})),
|
|
15995
16050
|
Float32Array: new Map(Object.entries({
|
|
15996
16051
|
es2022: [
|
|
15997
16052
|
"at"
|
|
@@ -16163,7 +16218,7 @@ ${lanes.join(`
|
|
|
16163
16218
|
return (_a = symbol.declarations) == null ? void 0 : _a.find((d) => !isExternalModuleAugmentation(d) && !(isModuleDeclaration(d) && isGlobalScopeAugmentation(d)));
|
|
16164
16219
|
}
|
|
16165
16220
|
function isCommonJSContainingModuleKind(kind) {
|
|
16166
|
-
return kind === 1 ||
|
|
16221
|
+
return kind === 1 || 100 <= kind && kind <= 199;
|
|
16167
16222
|
}
|
|
16168
16223
|
function isEffectiveExternalModule(node, compilerOptions) {
|
|
16169
16224
|
return isExternalModule(node) || isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator;
|
|
@@ -16807,9 +16862,6 @@ ${lanes.join(`
|
|
|
16807
16862
|
return key === propName || key2 && key2 === propName ? callback(property) : void 0;
|
|
16808
16863
|
});
|
|
16809
16864
|
}
|
|
16810
|
-
function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) {
|
|
16811
|
-
return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);
|
|
16812
|
-
}
|
|
16813
16865
|
function getTsConfigObjectLiteralExpression(tsConfigSourceFile) {
|
|
16814
16866
|
if (tsConfigSourceFile && tsConfigSourceFile.statements.length) {
|
|
16815
16867
|
let expression = tsConfigSourceFile.statements[0].expression;
|
|
@@ -20045,7 +20097,7 @@ ${lanes.join(`
|
|
|
20045
20097
|
},
|
|
20046
20098
|
target: {
|
|
20047
20099
|
dependencies: ["module"],
|
|
20048
|
-
computeValue: (compilerOptions) => (compilerOptions.target === 0 ? void 0 : compilerOptions.target) ?? (compilerOptions.module === 100 && 9 || compilerOptions.module === 199 && 99 || 1)
|
|
20100
|
+
computeValue: (compilerOptions) => (compilerOptions.target === 0 ? void 0 : compilerOptions.target) ?? (compilerOptions.module === 100 && 9 || compilerOptions.module === 101 && 9 || compilerOptions.module === 199 && 99 || 1)
|
|
20049
20101
|
},
|
|
20050
20102
|
module: {
|
|
20051
20103
|
dependencies: ["target"],
|
|
@@ -20061,6 +20113,7 @@ ${lanes.join(`
|
|
|
20061
20113
|
moduleResolution = 2;
|
|
20062
20114
|
break;
|
|
20063
20115
|
case 100:
|
|
20116
|
+
case 101:
|
|
20064
20117
|
moduleResolution = 3;
|
|
20065
20118
|
break;
|
|
20066
20119
|
case 199:
|
|
@@ -20078,7 +20131,12 @@ ${lanes.join(`
|
|
|
20078
20131
|
},
|
|
20079
20132
|
moduleDetection: {
|
|
20080
20133
|
dependencies: ["module", "target"],
|
|
20081
|
-
computeValue: (compilerOptions) =>
|
|
20134
|
+
computeValue: (compilerOptions) => {
|
|
20135
|
+
if (compilerOptions.moduleDetection !== void 0)
|
|
20136
|
+
return compilerOptions.moduleDetection;
|
|
20137
|
+
let moduleKind = _computedOptions.module.computeValue(compilerOptions);
|
|
20138
|
+
return 100 <= moduleKind && moduleKind <= 199 ? 3 : 2;
|
|
20139
|
+
}
|
|
20082
20140
|
},
|
|
20083
20141
|
isolatedModules: {
|
|
20084
20142
|
dependencies: ["verbatimModuleSyntax"],
|
|
@@ -20091,6 +20149,7 @@ ${lanes.join(`
|
|
|
20091
20149
|
return compilerOptions.esModuleInterop;
|
|
20092
20150
|
switch (_computedOptions.module.computeValue(compilerOptions)) {
|
|
20093
20151
|
case 100:
|
|
20152
|
+
case 101:
|
|
20094
20153
|
case 199:
|
|
20095
20154
|
case 200:
|
|
20096
20155
|
return !0;
|
|
@@ -20222,6 +20281,9 @@ ${lanes.join(`
|
|
|
20222
20281
|
function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) {
|
|
20223
20282
|
return moduleResolution >= 3 && moduleResolution <= 99 || moduleResolution === 100;
|
|
20224
20283
|
}
|
|
20284
|
+
function moduleSupportsImportAttributes(moduleKind) {
|
|
20285
|
+
return 101 <= moduleKind && moduleKind <= 199 || moduleKind === 200 || moduleKind === 99;
|
|
20286
|
+
}
|
|
20225
20287
|
function getStrictOptionValue(compilerOptions, flag) {
|
|
20226
20288
|
return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
|
|
20227
20289
|
}
|
|
@@ -20862,7 +20924,7 @@ ${lanes.join(`
|
|
|
20862
20924
|
return success && result === 10 && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) }));
|
|
20863
20925
|
}
|
|
20864
20926
|
function isValidTypeOnlyAliasUseSite(useSite) {
|
|
20865
|
-
return !!(useSite.flags & 33554432) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
|
20927
|
+
return !!(useSite.flags & 33554432) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
|
|
20866
20928
|
}
|
|
20867
20929
|
function isShorthandPropertyNameUseSite(useSite) {
|
|
20868
20930
|
return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
|
|
@@ -21858,6 +21920,64 @@ ${lanes.join(`
|
|
|
21858
21920
|
function isNewScopeNode(node) {
|
|
21859
21921
|
return isFunctionLike(node) || isJSDocSignature(node) || isMappedTypeNode(node);
|
|
21860
21922
|
}
|
|
21923
|
+
function getLibNameFromLibReference(libReference) {
|
|
21924
|
+
return toFileNameLowerCase(libReference.fileName);
|
|
21925
|
+
}
|
|
21926
|
+
function getLibFileNameFromLibReference(libReference) {
|
|
21927
|
+
let libName = getLibNameFromLibReference(libReference);
|
|
21928
|
+
return libMap.get(libName);
|
|
21929
|
+
}
|
|
21930
|
+
function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
|
|
21931
|
+
return forEachProjectReference(
|
|
21932
|
+
/*projectReferences*/
|
|
21933
|
+
void 0,
|
|
21934
|
+
resolvedProjectReferences,
|
|
21935
|
+
(resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2)
|
|
21936
|
+
);
|
|
21937
|
+
}
|
|
21938
|
+
function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) {
|
|
21939
|
+
let seenResolvedRefs;
|
|
21940
|
+
return worker(
|
|
21941
|
+
projectReferences,
|
|
21942
|
+
resolvedProjectReferences,
|
|
21943
|
+
/*parent*/
|
|
21944
|
+
void 0
|
|
21945
|
+
);
|
|
21946
|
+
function worker(projectReferences2, resolvedProjectReferences2, parent2) {
|
|
21947
|
+
if (cbRef) {
|
|
21948
|
+
let result = cbRef(projectReferences2, parent2);
|
|
21949
|
+
if (result) return result;
|
|
21950
|
+
}
|
|
21951
|
+
let skipChildren;
|
|
21952
|
+
return forEach(
|
|
21953
|
+
resolvedProjectReferences2,
|
|
21954
|
+
(resolvedRef, index) => {
|
|
21955
|
+
if (resolvedRef && seenResolvedRefs?.has(resolvedRef.sourceFile.path)) {
|
|
21956
|
+
(skipChildren ?? (skipChildren = /* @__PURE__ */ new Set())).add(resolvedRef);
|
|
21957
|
+
return;
|
|
21958
|
+
}
|
|
21959
|
+
let result = cbResolvedRef(resolvedRef, parent2, index);
|
|
21960
|
+
if (result || !resolvedRef) return result;
|
|
21961
|
+
(seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path);
|
|
21962
|
+
}
|
|
21963
|
+
) || forEach(
|
|
21964
|
+
resolvedProjectReferences2,
|
|
21965
|
+
(resolvedRef) => resolvedRef && !skipChildren?.has(resolvedRef) ? worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef) : void 0
|
|
21966
|
+
);
|
|
21967
|
+
}
|
|
21968
|
+
}
|
|
21969
|
+
function getOptionsSyntaxByArrayElementValue(optionsObject, name, value) {
|
|
21970
|
+
return optionsObject && getPropertyArrayElementValue(optionsObject, name, value);
|
|
21971
|
+
}
|
|
21972
|
+
function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) {
|
|
21973
|
+
return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0);
|
|
21974
|
+
}
|
|
21975
|
+
function getOptionsSyntaxByValue(optionsObject, name, value) {
|
|
21976
|
+
return forEachOptionsSyntaxByName(optionsObject, name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0);
|
|
21977
|
+
}
|
|
21978
|
+
function forEachOptionsSyntaxByName(optionsObject, name, callback) {
|
|
21979
|
+
return forEachPropertyAssignment(optionsObject, name, callback);
|
|
21980
|
+
}
|
|
21861
21981
|
function createBaseNodeFactory() {
|
|
21862
21982
|
let NodeConstructor2, TokenConstructor2, IdentifierConstructor2, PrivateIdentifierConstructor2, SourceFileConstructor2;
|
|
21863
21983
|
return {
|
|
@@ -24322,7 +24442,7 @@ ${lanes.join(`
|
|
|
24322
24442
|
), node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue), node.colonToken = colonToken ?? createToken(
|
|
24323
24443
|
59
|
|
24324
24444
|
/* ColonToken */
|
|
24325
|
-
), node.whenFalse = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenFalse), node.transformFlags |= propagateChildFlags(node.condition) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.whenTrue) | propagateChildFlags(node.colonToken) | propagateChildFlags(node.whenFalse), node;
|
|
24445
|
+
), node.whenFalse = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenFalse), node.transformFlags |= propagateChildFlags(node.condition) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.whenTrue) | propagateChildFlags(node.colonToken) | propagateChildFlags(node.whenFalse), node.flowNodeWhenFalse = void 0, node.flowNodeWhenTrue = void 0, node;
|
|
24326
24446
|
}
|
|
24327
24447
|
function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) {
|
|
24328
24448
|
return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node;
|
|
@@ -25805,7 +25925,7 @@ ${lanes.join(`
|
|
|
25805
25925
|
function isIgnorableParen(node) {
|
|
25806
25926
|
return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node));
|
|
25807
25927
|
}
|
|
25808
|
-
function restoreOuterExpressions(outerExpression, innerExpression, kinds =
|
|
25928
|
+
function restoreOuterExpressions(outerExpression, innerExpression, kinds = 63) {
|
|
25809
25929
|
return outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression) ? updateOuterExpression(
|
|
25810
25930
|
outerExpression,
|
|
25811
25931
|
restoreOuterExpressions(outerExpression.expression, innerExpression)
|
|
@@ -25842,7 +25962,7 @@ ${lanes.join(`
|
|
|
25842
25962
|
function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = !1) {
|
|
25843
25963
|
let callee = skipOuterExpressions(
|
|
25844
25964
|
expression,
|
|
25845
|
-
|
|
25965
|
+
63
|
|
25846
25966
|
/* All */
|
|
25847
25967
|
), thisArg, target;
|
|
25848
25968
|
return isSuperProperty(callee) ? (thisArg = createThis(), target = callee) : isSuperKeyword(callee) ? (thisArg = createThis(), target = languageVersion !== void 0 && languageVersion < 2 ? setTextRange(createIdentifier("_super"), callee) : callee) : getEmitFlags(callee) & 8192 ? (thisArg = createVoidZero(), target = parenthesizerRules().parenthesizeLeftSideOfAccess(
|
|
@@ -28508,14 +28628,15 @@ ${lanes.join(`
|
|
|
28508
28628
|
let type = getJSDocType(node);
|
|
28509
28629
|
return Debug.assertIsDefined(type), type;
|
|
28510
28630
|
}
|
|
28511
|
-
function isOuterExpression(node, kinds =
|
|
28631
|
+
function isOuterExpression(node, kinds = 63) {
|
|
28512
28632
|
switch (node.kind) {
|
|
28513
28633
|
case 217:
|
|
28514
28634
|
return kinds & -2147483648 && isJSDocTypeAssertion(node) ? !1 : (kinds & 1) !== 0;
|
|
28515
28635
|
case 216:
|
|
28516
28636
|
case 234:
|
|
28517
|
-
case 238:
|
|
28518
28637
|
return (kinds & 2) !== 0;
|
|
28638
|
+
case 238:
|
|
28639
|
+
return (kinds & 34) !== 0;
|
|
28519
28640
|
case 233:
|
|
28520
28641
|
return (kinds & 16) !== 0;
|
|
28521
28642
|
case 235:
|
|
@@ -28525,12 +28646,12 @@ ${lanes.join(`
|
|
|
28525
28646
|
}
|
|
28526
28647
|
return !1;
|
|
28527
28648
|
}
|
|
28528
|
-
function skipOuterExpressions(node, kinds =
|
|
28649
|
+
function skipOuterExpressions(node, kinds = 63) {
|
|
28529
28650
|
for (; isOuterExpression(node, kinds); )
|
|
28530
28651
|
node = node.expression;
|
|
28531
28652
|
return node;
|
|
28532
28653
|
}
|
|
28533
|
-
function walkUpOuterExpressions(node, kinds =
|
|
28654
|
+
function walkUpOuterExpressions(node, kinds = 63) {
|
|
28534
28655
|
let parent2 = node.parent;
|
|
28535
28656
|
for (; isOuterExpression(parent2, kinds); )
|
|
28536
28657
|
parent2 = parent2.parent, Debug.assert(parent2);
|
|
@@ -32747,7 +32868,7 @@ ${lanes.join(`
|
|
|
32747
32868
|
/* LessThanToken */
|
|
32748
32869
|
), token() === 32)
|
|
32749
32870
|
return scanJsxText(), finishNode(factory2.createJsxOpeningFragment(), pos);
|
|
32750
|
-
let tagName = parseJsxElementName(), typeArguments = contextFlags & 524288
|
|
32871
|
+
let tagName = parseJsxElementName(), typeArguments = (contextFlags & 524288) === 0 ? tryParseTypeArguments() : void 0, attributes = parseJsxAttributes(), node;
|
|
32751
32872
|
return token() === 32 ? (scanJsxText(), node = factory2.createJsxOpeningElement(tagName, typeArguments, attributes)) : (parseExpected(
|
|
32752
32873
|
44
|
|
32753
32874
|
/* SlashToken */
|
|
@@ -33065,7 +33186,7 @@ ${lanes.join(`
|
|
|
33065
33186
|
), result;
|
|
33066
33187
|
}
|
|
33067
33188
|
function parseTypeArgumentsInExpression() {
|
|
33068
|
-
if (contextFlags & 524288 || reScanLessThanToken() !== 30)
|
|
33189
|
+
if ((contextFlags & 524288) !== 0 || reScanLessThanToken() !== 30)
|
|
33069
33190
|
return;
|
|
33070
33191
|
nextToken();
|
|
33071
33192
|
let typeArguments = parseDelimitedList(20, parseType);
|
|
@@ -35441,10 +35562,10 @@ ${lanes.join(`
|
|
|
35441
35562
|
let typeArguments = tryParseTypeArguments();
|
|
35442
35563
|
scanner2.setSkipJsDocLeadingAsterisks(!1);
|
|
35443
35564
|
let node = factory2.createExpressionWithTypeArguments(expression, typeArguments), res = finishNode(node, pos);
|
|
35444
|
-
return usedBrace && parseExpected(
|
|
35565
|
+
return usedBrace && (skipWhitespace(), parseExpected(
|
|
35445
35566
|
20
|
|
35446
35567
|
/* CloseBraceToken */
|
|
35447
|
-
), res;
|
|
35568
|
+
)), res;
|
|
35448
35569
|
}
|
|
35449
35570
|
function parsePropertyAccessEntityNameExpression() {
|
|
35450
35571
|
let pos = getNodePos(), node = parseJSDocIdentifierName();
|
|
@@ -36266,6 +36387,8 @@ ${lanes.join(`
|
|
|
36266
36387
|
["esnext.regexp", "lib.es2024.regexp.d.ts"],
|
|
36267
36388
|
["esnext.string", "lib.es2024.string.d.ts"],
|
|
36268
36389
|
["esnext.iterator", "lib.esnext.iterator.d.ts"],
|
|
36390
|
+
["esnext.promise", "lib.esnext.promise.d.ts"],
|
|
36391
|
+
["esnext.float16", "lib.esnext.float16.d.ts"],
|
|
36269
36392
|
["decorators", "lib.decorators.d.ts"],
|
|
36270
36393
|
["decorators.legacy", "lib.decorators.legacy.d.ts"]
|
|
36271
36394
|
], libs = libEntries.map((entry) => entry[0]), libMap = new Map(libEntries), optionsForWatch = [
|
|
@@ -36594,6 +36717,7 @@ ${lanes.join(`
|
|
|
36594
36717
|
es2022: 7,
|
|
36595
36718
|
esnext: 99,
|
|
36596
36719
|
node16: 100,
|
|
36720
|
+
node18: 101,
|
|
36597
36721
|
nodenext: 199,
|
|
36598
36722
|
preserve: 200
|
|
36599
36723
|
/* Preserve */
|
|
@@ -36848,6 +36972,23 @@ ${lanes.join(`
|
|
|
36848
36972
|
affectsBuildInfo: !0,
|
|
36849
36973
|
affectsSemanticDiagnostics: !0
|
|
36850
36974
|
},
|
|
36975
|
+
{
|
|
36976
|
+
name: "erasableSyntaxOnly",
|
|
36977
|
+
type: "boolean",
|
|
36978
|
+
category: Diagnostics.Interop_Constraints,
|
|
36979
|
+
description: Diagnostics.Do_not_allow_runtime_constructs_that_are_not_part_of_ECMAScript,
|
|
36980
|
+
defaultValueDescription: !1,
|
|
36981
|
+
affectsBuildInfo: !0,
|
|
36982
|
+
affectsSemanticDiagnostics: !0
|
|
36983
|
+
},
|
|
36984
|
+
{
|
|
36985
|
+
name: "libReplacement",
|
|
36986
|
+
type: "boolean",
|
|
36987
|
+
affectsProgramStructure: !0,
|
|
36988
|
+
category: Diagnostics.Language_and_Environment,
|
|
36989
|
+
description: Diagnostics.Enable_lib_replacement,
|
|
36990
|
+
defaultValueDescription: !0
|
|
36991
|
+
},
|
|
36851
36992
|
// Strict Type Checks
|
|
36852
36993
|
{
|
|
36853
36994
|
name: "strict",
|
|
@@ -40224,8 +40365,8 @@ ${lanes.join(`
|
|
|
40224
40365
|
(_a = state.failedLookupLocations) == null || _a.push(fileName);
|
|
40225
40366
|
}
|
|
40226
40367
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = !0) {
|
|
40227
|
-
let packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0
|
|
40228
|
-
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
|
40368
|
+
let packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0;
|
|
40369
|
+
return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo), state);
|
|
40229
40370
|
}
|
|
40230
40371
|
function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) {
|
|
40231
40372
|
if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0)
|
|
@@ -40238,8 +40379,7 @@ ${lanes.join(`
|
|
|
40238
40379
|
/*onlyRecordFailures*/
|
|
40239
40380
|
!1,
|
|
40240
40381
|
loadPackageJsonMainState,
|
|
40241
|
-
packageJsonInfo
|
|
40242
|
-
getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState)
|
|
40382
|
+
packageJsonInfo
|
|
40243
40383
|
);
|
|
40244
40384
|
if (entrypoints = append(entrypoints, mainResolution?.path), features & 8 && packageJsonInfo.contents.packageJsonContent.exports) {
|
|
40245
40385
|
let conditionSets = deduplicate(
|
|
@@ -40405,9 +40545,9 @@ ${lanes.join(`
|
|
|
40405
40545
|
} else
|
|
40406
40546
|
directoryExists && traceEnabled && trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath), state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly && state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, { packageDirectory, directoryExists }), (_f = state.failedLookupLocations) == null || _f.push(packageJsonPath);
|
|
40407
40547
|
}
|
|
40408
|
-
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state,
|
|
40409
|
-
let packageFile;
|
|
40410
|
-
|
|
40548
|
+
function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJson) {
|
|
40549
|
+
let versionPaths = packageJson && getVersionPathsOfPackageJsonInfo(packageJson, state), packageFile;
|
|
40550
|
+
packageJson && arePathsEqual(packageJson?.packageDirectory, candidate, state.host) && (state.isConfigLookup ? packageFile = readPackageJsonTSConfigField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) : packageFile = extensions & 4 && readPackageJsonTypesFields(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || extensions & 7 && readPackageJsonMainField(packageJson.contents.packageJsonContent, packageJson.packageDirectory, state) || void 0);
|
|
40411
40551
|
let loader = (extensions2, candidate2, onlyRecordFailures2, state2) => {
|
|
40412
40552
|
let fromFile = loadFileNameFromPackageJsonField(
|
|
40413
40553
|
extensions2,
|
|
@@ -40420,7 +40560,7 @@ ${lanes.join(`
|
|
|
40420
40560
|
if (fromFile)
|
|
40421
40561
|
return noPackageId(fromFile);
|
|
40422
40562
|
let expandedExtensions = extensions2 === 4 ? 5 : extensions2, features = state2.features, candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField;
|
|
40423
|
-
state2.candidateIsFromPackageJsonField = !0,
|
|
40563
|
+
state2.candidateIsFromPackageJsonField = !0, packageJson?.contents.packageJsonContent.type !== "module" && (state2.features &= -33);
|
|
40424
40564
|
let result = nodeLoadModuleByRelativeName(
|
|
40425
40565
|
expandedExtensions,
|
|
40426
40566
|
candidate2,
|
|
@@ -40616,6 +40756,7 @@ ${lanes.join(`
|
|
|
40616
40756
|
function getLoadModuleFromTargetExportOrImport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
|
|
40617
40757
|
return loadModuleFromTargetExportOrImport;
|
|
40618
40758
|
function loadModuleFromTargetExportOrImport(target, subpath, pattern, key) {
|
|
40759
|
+
var _a, _b;
|
|
40619
40760
|
if (typeof target == "string") {
|
|
40620
40761
|
if (!pattern && subpath.length > 0 && !endsWith(target, "/"))
|
|
40621
40762
|
return state.traceEnabled && trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName), toSearchResult(
|
|
@@ -40639,7 +40780,7 @@ ${lanes.join(`
|
|
|
40639
40780
|
redirectedReference,
|
|
40640
40781
|
state.conditions
|
|
40641
40782
|
);
|
|
40642
|
-
return toSearchResult(
|
|
40783
|
+
return (_a = state.failedLookupLocations) == null || _a.push(...result.failedLookupLocations ?? emptyArray), (_b = state.affectingLocations) == null || _b.push(...result.affectingLocations ?? emptyArray), toSearchResult(
|
|
40643
40784
|
result.resolvedModule ? {
|
|
40644
40785
|
path: result.resolvedModule.resolvedFileName,
|
|
40645
40786
|
extension: result.resolvedModule.extension,
|
|
@@ -40712,18 +40853,18 @@ ${lanes.join(`
|
|
|
40712
40853
|
void 0
|
|
40713
40854
|
);
|
|
40714
40855
|
function toAbsolutePath(path) {
|
|
40715
|
-
var
|
|
40716
|
-
return path === void 0 ? path : getNormalizedAbsolutePath(path, (
|
|
40856
|
+
var _a2, _b2;
|
|
40857
|
+
return path === void 0 ? path : getNormalizedAbsolutePath(path, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
|
|
40717
40858
|
}
|
|
40718
40859
|
function combineDirectoryPath(root, dir) {
|
|
40719
40860
|
return ensureTrailingDirectorySeparator(combinePaths(root, dir));
|
|
40720
40861
|
}
|
|
40721
40862
|
function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) {
|
|
40722
|
-
var
|
|
40863
|
+
var _a2, _b2, _c, _d;
|
|
40723
40864
|
if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (!state.compilerOptions.configFile || containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)))) {
|
|
40724
40865
|
let getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }), commonSourceDirGuesses = [];
|
|
40725
40866
|
if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) {
|
|
40726
|
-
let commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((
|
|
40867
|
+
let commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "", getCanonicalFileName));
|
|
40727
40868
|
commonSourceDirGuesses.push(commonDir);
|
|
40728
40869
|
} else if (state.requestContainingDirectory) {
|
|
40729
40870
|
let requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, "index.ts")), commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [requestingFile, toAbsolutePath(packagePath)], ((_d = (_c = state.host).getCurrentDirectory) == null ? void 0 : _d.call(_c)) || "", getCanonicalFileName));
|
|
@@ -40779,8 +40920,8 @@ ${lanes.join(`
|
|
|
40779
40920
|
}
|
|
40780
40921
|
return;
|
|
40781
40922
|
function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) {
|
|
40782
|
-
var
|
|
40783
|
-
let currentDir = state.compilerOptions.configFile ? ((
|
|
40923
|
+
var _a3, _b3;
|
|
40924
|
+
let currentDir = state.compilerOptions.configFile ? ((_b3 = (_a3 = state.host).getCurrentDirectory) == null ? void 0 : _b3.call(_a3)) || "" : commonSourceDirGuess, candidateDirectories = [];
|
|
40784
40925
|
return state.compilerOptions.declarationDir && candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir))), state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir && candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir))), candidateDirectories;
|
|
40785
40926
|
}
|
|
40786
40927
|
}
|
|
@@ -40818,7 +40959,7 @@ ${lanes.join(`
|
|
|
40818
40959
|
);
|
|
40819
40960
|
}
|
|
40820
40961
|
function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
|
|
40821
|
-
let mode = state.features === 0 ? void 0 : state.features & 32 ? 99 : 1, priorityExtensions = extensions & 5, secondaryExtensions = extensions & -6;
|
|
40962
|
+
let mode = state.features === 0 ? void 0 : state.features & 32 || state.conditions.includes("import") ? 99 : 1, priorityExtensions = extensions & 5, secondaryExtensions = extensions & -6;
|
|
40822
40963
|
if (priorityExtensions) {
|
|
40823
40964
|
traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions));
|
|
40824
40965
|
let result = lookup(priorityExtensions);
|
|
@@ -40872,8 +41013,7 @@ ${lanes.join(`
|
|
|
40872
41013
|
candidate,
|
|
40873
41014
|
!nodeModulesDirectoryExists,
|
|
40874
41015
|
state,
|
|
40875
|
-
packageInfo
|
|
40876
|
-
getVersionPathsOfPackageJsonInfo(packageInfo, state)
|
|
41016
|
+
packageInfo
|
|
40877
41017
|
);
|
|
40878
41018
|
return withPackageId(packageInfo, fromDirectory, state);
|
|
40879
41019
|
}
|
|
@@ -40883,10 +41023,9 @@ ${lanes.join(`
|
|
|
40883
41023
|
candidate2,
|
|
40884
41024
|
onlyRecordFailures,
|
|
40885
41025
|
state2,
|
|
40886
|
-
packageInfo
|
|
40887
|
-
packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2)
|
|
41026
|
+
packageInfo
|
|
40888
41027
|
);
|
|
40889
|
-
return !pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 && (pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2)), withPackageId(packageInfo, pathAndExtension, state2);
|
|
41028
|
+
return !pathAndExtension && !rest && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 && (pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2)), withPackageId(packageInfo, pathAndExtension, state2);
|
|
40890
41029
|
};
|
|
40891
41030
|
if (rest !== "" && (packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state)), packageInfo && (state.resolvedPackageDirectory = !0), packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & 8)
|
|
40892
41031
|
return (_b = loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)) == null ? void 0 : _b.value;
|
|
@@ -41212,7 +41351,7 @@ ${lanes.join(`
|
|
|
41212
41351
|
mark("beforeBind"), binder(file, options), mark("afterBind"), measure("Bind", "beforeBind", "afterBind");
|
|
41213
41352
|
}
|
|
41214
41353
|
function createBinder() {
|
|
41215
|
-
var file, options, languageVersion, parent2, container, thisParentContainer, blockScopeContainer, lastContainer, delayedTypeAliases, seenThisKeyword, jsDocImports, currentFlow, currentBreakTarget, currentContinueTarget, currentReturnTarget, currentTrueTarget, currentFalseTarget, currentExceptionTarget, preSwitchCaseFlow, activeLabelList, hasExplicitReturn, hasFlowEffects, emitFlags, inStrictMode, inAssignmentPattern = !1, symbolCount = 0, Symbol48, classifiableNames, unreachableFlow = createFlowNode(
|
|
41354
|
+
var file, options, languageVersion, parent2, container, thisParentContainer, blockScopeContainer, lastContainer, delayedTypeAliases, seenThisKeyword, jsDocImports, currentFlow, currentBreakTarget, currentContinueTarget, currentReturnTarget, currentTrueTarget, currentFalseTarget, currentExceptionTarget, preSwitchCaseFlow, activeLabelList, hasExplicitReturn, inReturnPosition, hasFlowEffects, emitFlags, inStrictMode, inAssignmentPattern = !1, symbolCount = 0, Symbol48, classifiableNames, unreachableFlow = createFlowNode(
|
|
41216
41355
|
1,
|
|
41217
41356
|
/*node*/
|
|
41218
41357
|
void 0,
|
|
@@ -41237,7 +41376,7 @@ ${lanes.join(`
|
|
|
41237
41376
|
{ path: file.path },
|
|
41238
41377
|
/*separateBeginAndEnd*/
|
|
41239
41378
|
!0
|
|
41240
|
-
), bind(file), (_b = tracing) == null || _b.pop(), file.symbolCount = symbolCount, file.classifiableNames = classifiableNames, delayedBindJSDocTypedefTag(), bindJSDocImports()), file = void 0, options = void 0, languageVersion = void 0, parent2 = void 0, container = void 0, thisParentContainer = void 0, blockScopeContainer = void 0, lastContainer = void 0, delayedTypeAliases = void 0, jsDocImports = void 0, seenThisKeyword = !1, currentFlow = void 0, currentBreakTarget = void 0, currentContinueTarget = void 0, currentReturnTarget = void 0, currentTrueTarget = void 0, currentFalseTarget = void 0, currentExceptionTarget = void 0, activeLabelList = void 0, hasExplicitReturn = !1, hasFlowEffects = !1, inAssignmentPattern = !1, emitFlags = 0;
|
|
41379
|
+
), bind(file), (_b = tracing) == null || _b.pop(), file.symbolCount = symbolCount, file.classifiableNames = classifiableNames, delayedBindJSDocTypedefTag(), bindJSDocImports()), file = void 0, options = void 0, languageVersion = void 0, parent2 = void 0, container = void 0, thisParentContainer = void 0, blockScopeContainer = void 0, lastContainer = void 0, delayedTypeAliases = void 0, jsDocImports = void 0, seenThisKeyword = !1, currentFlow = void 0, currentBreakTarget = void 0, currentContinueTarget = void 0, currentReturnTarget = void 0, currentTrueTarget = void 0, currentFalseTarget = void 0, currentExceptionTarget = void 0, activeLabelList = void 0, hasExplicitReturn = !1, inReturnPosition = !1, hasFlowEffects = !1, inAssignmentPattern = !1, emitFlags = 0;
|
|
41241
41380
|
}
|
|
41242
41381
|
function bindInStrictMode(file2, opts) {
|
|
41243
41382
|
return getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile ? !0 : !!file2.externalModuleIndicator;
|
|
@@ -41395,8 +41534,8 @@ ${lanes.join(`
|
|
|
41395
41534
|
return declName ? !!(isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent) || isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32) : !1;
|
|
41396
41535
|
}
|
|
41397
41536
|
function bindContainer(node, containerFlags) {
|
|
41398
|
-
let saveContainer = container, saveThisParentContainer = thisParentContainer, savedBlockScopeContainer = blockScopeContainer;
|
|
41399
|
-
if (containerFlags & 1 ? (node.kind !== 219 && (thisParentContainer = container), container = blockScopeContainer = node, containerFlags & 32 && (container.locals = createSymbolTable(), addToContainerChain(container))) : containerFlags & 2 && (blockScopeContainer = node, containerFlags & 32 && (blockScopeContainer.locals = void 0)), containerFlags & 4) {
|
|
41537
|
+
let saveContainer = container, saveThisParentContainer = thisParentContainer, savedBlockScopeContainer = blockScopeContainer, savedInReturnPosition = inReturnPosition;
|
|
41538
|
+
if (node.kind === 219 && node.body.kind !== 241 && (inReturnPosition = !0), containerFlags & 1 ? (node.kind !== 219 && (thisParentContainer = container), container = blockScopeContainer = node, containerFlags & 32 && (container.locals = createSymbolTable(), addToContainerChain(container))) : containerFlags & 2 && (blockScopeContainer = node, containerFlags & 32 && (blockScopeContainer.locals = void 0)), containerFlags & 4) {
|
|
41400
41539
|
let saveCurrentFlow = currentFlow, saveBreakTarget = currentBreakTarget, saveContinueTarget = currentContinueTarget, saveReturnTarget = currentReturnTarget, saveExceptionTarget = currentExceptionTarget, saveActiveLabelList = activeLabelList, saveHasExplicitReturn = hasExplicitReturn, isImmediatelyInvoked = containerFlags & 16 && !hasSyntacticModifier(
|
|
41401
41540
|
node,
|
|
41402
41541
|
1024
|
|
@@ -41410,7 +41549,7 @@ ${lanes.join(`
|
|
|
41410
41549
|
void 0
|
|
41411
41550
|
), containerFlags & 144 && (currentFlow.node = node)), currentReturnTarget = isImmediatelyInvoked || node.kind === 176 || isInJSFile(node) && (node.kind === 262 || node.kind === 218) ? createBranchLabel() : void 0, currentExceptionTarget = void 0, currentBreakTarget = void 0, currentContinueTarget = void 0, activeLabelList = void 0, hasExplicitReturn = !1, bindChildren(node), node.flags &= -5633, !(currentFlow.flags & 1) && containerFlags & 8 && nodeIsPresent(node.body) && (node.flags |= 512, hasExplicitReturn && (node.flags |= 1024), node.endFlowNode = currentFlow), node.kind === 307 && (node.flags |= emitFlags, node.endFlowNode = currentFlow), currentReturnTarget && (addAntecedent(currentReturnTarget, currentFlow), currentFlow = finishFlowLabel(currentReturnTarget), (node.kind === 176 || node.kind === 175 || isInJSFile(node) && (node.kind === 262 || node.kind === 218)) && (node.returnFlowNode = currentFlow)), isImmediatelyInvoked || (currentFlow = saveCurrentFlow), currentBreakTarget = saveBreakTarget, currentContinueTarget = saveContinueTarget, currentReturnTarget = saveReturnTarget, currentExceptionTarget = saveExceptionTarget, activeLabelList = saveActiveLabelList, hasExplicitReturn = saveHasExplicitReturn;
|
|
41412
41551
|
} else containerFlags & 64 ? (seenThisKeyword = !1, bindChildren(node), Debug.assertNotNode(node, isIdentifier), node.flags = seenThisKeyword ? node.flags | 256 : node.flags & -257) : bindChildren(node);
|
|
41413
|
-
container = saveContainer, thisParentContainer = saveThisParentContainer, blockScopeContainer = savedBlockScopeContainer;
|
|
41552
|
+
inReturnPosition = savedInReturnPosition, container = saveContainer, thisParentContainer = saveThisParentContainer, blockScopeContainer = savedBlockScopeContainer;
|
|
41414
41553
|
}
|
|
41415
41554
|
function bindEachFunctionsFirst(nodes) {
|
|
41416
41555
|
bindEach(nodes, (n) => n.kind === 262 ? bind(n) : void 0), bindEach(nodes, (n) => n.kind !== 262 ? bind(n) : void 0);
|
|
@@ -41424,7 +41563,7 @@ ${lanes.join(`
|
|
|
41424
41563
|
function bindChildren(node) {
|
|
41425
41564
|
let saveInAssignmentPattern = inAssignmentPattern;
|
|
41426
41565
|
if (inAssignmentPattern = !1, checkUnreachable(node)) {
|
|
41427
|
-
bindEachChild(node), bindJSDoc(node), inAssignmentPattern = saveInAssignmentPattern;
|
|
41566
|
+
canHaveFlowNode(node) && node.flowNode && (node.flowNode = void 0), bindEachChild(node), bindJSDoc(node), inAssignmentPattern = saveInAssignmentPattern;
|
|
41428
41567
|
return;
|
|
41429
41568
|
}
|
|
41430
41569
|
switch (node.kind >= 243 && node.kind <= 259 && (!options.allowUnreachableCode || node.kind === 253) && (node.flowNode = currentFlow), node.kind) {
|
|
@@ -41605,7 +41744,8 @@ ${lanes.join(`
|
|
|
41605
41744
|
case 36:
|
|
41606
41745
|
case 37:
|
|
41607
41746
|
case 38:
|
|
41608
|
-
|
|
41747
|
+
let left = skipParentheses(expr.left), right = skipParentheses(expr.right);
|
|
41748
|
+
return isNarrowableOperand(left) || isNarrowableOperand(right) || isNarrowingTypeofOperands(right, left) || isNarrowingTypeofOperands(left, right) || isBooleanLiteral(right) && isNarrowingExpression(left) || isBooleanLiteral(left) && isNarrowingExpression(right);
|
|
41609
41749
|
case 104:
|
|
41610
41750
|
return isNarrowableOperand(expr.left);
|
|
41611
41751
|
case 103:
|
|
@@ -41730,8 +41870,8 @@ ${lanes.join(`
|
|
|
41730
41870
|
addAntecedent(preDoLabel, currentFlow), currentFlow = preDoLabel, bindIterativeStatement(node.statement, postDoLabel, preConditionLabel), addAntecedent(preConditionLabel, currentFlow), currentFlow = finishFlowLabel(preConditionLabel), bindCondition(node.expression, preDoLabel, postDoLabel), currentFlow = finishFlowLabel(postDoLabel);
|
|
41731
41871
|
}
|
|
41732
41872
|
function bindForStatement(node) {
|
|
41733
|
-
let preLoopLabel = setContinueTarget(node, createLoopLabel()), preBodyLabel = createBranchLabel(), postLoopLabel = createBranchLabel();
|
|
41734
|
-
bind(node.initializer), addAntecedent(preLoopLabel, currentFlow), currentFlow = preLoopLabel, bindCondition(node.condition, preBodyLabel, postLoopLabel), currentFlow = finishFlowLabel(preBodyLabel), bindIterativeStatement(node.statement, postLoopLabel,
|
|
41873
|
+
let preLoopLabel = setContinueTarget(node, createLoopLabel()), preBodyLabel = createBranchLabel(), preIncrementorLabel = createBranchLabel(), postLoopLabel = createBranchLabel();
|
|
41874
|
+
bind(node.initializer), addAntecedent(preLoopLabel, currentFlow), currentFlow = preLoopLabel, bindCondition(node.condition, preBodyLabel, postLoopLabel), currentFlow = finishFlowLabel(preBodyLabel), bindIterativeStatement(node.statement, postLoopLabel, preIncrementorLabel), addAntecedent(preIncrementorLabel, currentFlow), currentFlow = finishFlowLabel(preIncrementorLabel), bind(node.incrementor), addAntecedent(preLoopLabel, currentFlow), currentFlow = finishFlowLabel(postLoopLabel);
|
|
41735
41875
|
}
|
|
41736
41876
|
function bindForInOrForOfStatement(node) {
|
|
41737
41877
|
let preLoopLabel = setContinueTarget(node, createLoopLabel()), postLoopLabel = createBranchLabel();
|
|
@@ -41742,7 +41882,8 @@ ${lanes.join(`
|
|
|
41742
41882
|
bindCondition(node.expression, thenLabel, elseLabel), currentFlow = finishFlowLabel(thenLabel), bind(node.thenStatement), addAntecedent(postIfLabel, currentFlow), currentFlow = finishFlowLabel(elseLabel), bind(node.elseStatement), addAntecedent(postIfLabel, currentFlow), currentFlow = finishFlowLabel(postIfLabel);
|
|
41743
41883
|
}
|
|
41744
41884
|
function bindReturnOrThrow(node) {
|
|
41745
|
-
|
|
41885
|
+
let savedInReturnPosition = inReturnPosition;
|
|
41886
|
+
inReturnPosition = !0, bind(node.expression), inReturnPosition = savedInReturnPosition, node.kind === 253 && (hasExplicitReturn = !0, currentReturnTarget && addAntecedent(currentReturnTarget, currentFlow)), currentFlow = unreachableFlow, hasFlowEffects = !0;
|
|
41746
41887
|
}
|
|
41747
41888
|
function findActiveLabel(name) {
|
|
41748
41889
|
for (let label = activeLabelList; label; label = label.next)
|
|
@@ -41917,7 +42058,7 @@ ${lanes.join(`
|
|
|
41917
42058
|
}
|
|
41918
42059
|
function bindConditionalExpressionFlow(node) {
|
|
41919
42060
|
let trueLabel = createBranchLabel(), falseLabel = createBranchLabel(), postExpressionLabel = createBranchLabel(), saveCurrentFlow = currentFlow, saveHasFlowEffects = hasFlowEffects;
|
|
41920
|
-
hasFlowEffects = !1, bindCondition(node.condition, trueLabel, falseLabel), currentFlow = finishFlowLabel(trueLabel), bind(node.questionToken), bind(node.whenTrue), addAntecedent(postExpressionLabel, currentFlow), currentFlow = finishFlowLabel(falseLabel), bind(node.colonToken), bind(node.whenFalse), addAntecedent(postExpressionLabel, currentFlow), currentFlow = hasFlowEffects ? finishFlowLabel(postExpressionLabel) : saveCurrentFlow, hasFlowEffects || (hasFlowEffects = saveHasFlowEffects);
|
|
42061
|
+
hasFlowEffects = !1, bindCondition(node.condition, trueLabel, falseLabel), currentFlow = finishFlowLabel(trueLabel), inReturnPosition && (node.flowNodeWhenTrue = currentFlow), bind(node.questionToken), bind(node.whenTrue), addAntecedent(postExpressionLabel, currentFlow), currentFlow = finishFlowLabel(falseLabel), inReturnPosition && (node.flowNodeWhenFalse = currentFlow), bind(node.colonToken), bind(node.whenFalse), addAntecedent(postExpressionLabel, currentFlow), currentFlow = hasFlowEffects ? finishFlowLabel(postExpressionLabel) : saveCurrentFlow, hasFlowEffects || (hasFlowEffects = saveHasFlowEffects);
|
|
41921
42062
|
}
|
|
41922
42063
|
function bindInitializedVariableFlow(node) {
|
|
41923
42064
|
let name = isOmittedExpression(node) ? void 0 : node.name;
|
|
@@ -44685,6 +44826,7 @@ ${lanes.join(`
|
|
|
44685
44826
|
getNumberLiteralType,
|
|
44686
44827
|
getBigIntType: () => bigintType,
|
|
44687
44828
|
getBigIntLiteralType,
|
|
44829
|
+
getUnknownType: () => unknownType,
|
|
44688
44830
|
createPromiseType,
|
|
44689
44831
|
createArrayType,
|
|
44690
44832
|
getElementTypeOfArrayType,
|
|
@@ -44796,8 +44938,13 @@ ${lanes.join(`
|
|
|
44796
44938
|
getMemberOverrideModifierStatus,
|
|
44797
44939
|
isTypeParameterPossiblyReferenced,
|
|
44798
44940
|
typeHasCallOrConstructSignatures,
|
|
44799
|
-
getSymbolFlags
|
|
44941
|
+
getSymbolFlags,
|
|
44942
|
+
getTypeArgumentsForResolvedSignature
|
|
44800
44943
|
};
|
|
44944
|
+
function getTypeArgumentsForResolvedSignature(signature) {
|
|
44945
|
+
if (signature.mapper !== void 0)
|
|
44946
|
+
return instantiateTypes((signature.target || signature).typeParameters, signature.mapper);
|
|
44947
|
+
}
|
|
44801
44948
|
function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) {
|
|
44802
44949
|
let candidatesSet = /* @__PURE__ */ new Set(), candidates = [];
|
|
44803
44950
|
runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker(
|
|
@@ -45749,8 +45896,8 @@ ${lanes.join(`
|
|
|
45749
45896
|
if (isPrimitiveTypeName(name)) {
|
|
45750
45897
|
let grandparent = errorLocation.parent.parent;
|
|
45751
45898
|
if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {
|
|
45752
|
-
let heritageKind = grandparent.token
|
|
45753
|
-
|
|
45899
|
+
let heritageKind = grandparent.token;
|
|
45900
|
+
grandparent.parent.kind === 264 && heritageKind === 96 ? error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name)) : isClassLike(grandparent.parent) && heritageKind === 96 ? error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name)) : isClassLike(grandparent.parent) && heritageKind === 119 && error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
|
|
45754
45901
|
} else
|
|
45755
45902
|
error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
|
|
45756
45903
|
return !0;
|
|
@@ -46699,7 +46846,7 @@ ${lanes.join(`
|
|
|
46699
46846
|
mode,
|
|
46700
46847
|
resolvedModule,
|
|
46701
46848
|
moduleReference
|
|
46702
|
-
), errorNode && (
|
|
46849
|
+
), errorNode && (moduleKind === 100 || moduleKind === 101)) {
|
|
46703
46850
|
let isSyncImport = currentSourceFile.impliedNodeFormat === 1 && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration), overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l) || isJSDocImportTag(l));
|
|
46704
46851
|
if (isSyncImport && sourceFile.impliedNodeFormat === 99 && !hasResolutionModeOverride(overrideHost))
|
|
46705
46852
|
if (findAncestor(location, isImportEqualsDeclaration))
|
|
@@ -47687,8 +47834,10 @@ ${lanes.join(`
|
|
|
47687
47834
|
serializeExistingTypeNode(context, typeNode, addUndefined) {
|
|
47688
47835
|
return serializeExistingTypeNode(context, typeNode, !!addUndefined);
|
|
47689
47836
|
},
|
|
47690
|
-
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration) {
|
|
47691
|
-
let context = syntacticContext, signature = getSignatureFromDeclaration(signatureDeclaration)
|
|
47837
|
+
serializeReturnTypeForSignature(syntacticContext, signatureDeclaration, symbol) {
|
|
47838
|
+
let context = syntacticContext, signature = getSignatureFromDeclaration(signatureDeclaration);
|
|
47839
|
+
symbol ?? (symbol = getSymbolOfDeclaration(signatureDeclaration));
|
|
47840
|
+
let returnType = context.enclosingSymbolTypes.get(getSymbolId(symbol)) ?? instantiateType(getReturnTypeOfSignature(signature), context.mapper);
|
|
47692
47841
|
return serializeInferredReturnTypeForSignature(context, signature, returnType);
|
|
47693
47842
|
},
|
|
47694
47843
|
serializeTypeOfExpression(syntacticContext, expr) {
|
|
@@ -47700,7 +47849,7 @@ ${lanes.join(`
|
|
|
47700
47849
|
let context = syntacticContext;
|
|
47701
47850
|
symbol ?? (symbol = getSymbolOfDeclaration(declaration));
|
|
47702
47851
|
let type = (_a = context.enclosingSymbolTypes) == null ? void 0 : _a.get(getSymbolId(symbol));
|
|
47703
|
-
return type === void 0 && (type = symbol && !(symbol.flags & 133120) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType), declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration) && (type = getOptionalType(type)), serializeInferredTypeForDeclaration(symbol, context, type);
|
|
47852
|
+
return type === void 0 && (type = symbol.flags & 98304 && declaration.kind === 178 ? instantiateType(getWriteTypeOfSymbol(symbol), context.mapper) : symbol && !(symbol.flags & 133120) ? instantiateType(getWidenedLiteralType(getTypeOfSymbol(symbol)), context.mapper) : errorType), declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration) && (type = getOptionalType(type)), serializeInferredTypeForDeclaration(symbol, context, type);
|
|
47704
47853
|
},
|
|
47705
47854
|
serializeNameOfParameter(context, parameter) {
|
|
47706
47855
|
return parameterToParameterDeclarationName(getSymbolOfDeclaration(parameter), parameter, context);
|
|
@@ -47728,12 +47877,8 @@ ${lanes.join(`
|
|
|
47728
47877
|
},
|
|
47729
47878
|
enterNewScope(context, node) {
|
|
47730
47879
|
if (isFunctionLike(node) || isJSDocSignature(node)) {
|
|
47731
|
-
let signature = getSignatureFromDeclaration(node)
|
|
47732
|
-
|
|
47733
|
-
/*skipUnionExpanding*/
|
|
47734
|
-
!0
|
|
47735
|
-
)[0];
|
|
47736
|
-
return enterNewScope(context, node, expandedParams, signature.typeParameters);
|
|
47880
|
+
let signature = getSignatureFromDeclaration(node);
|
|
47881
|
+
return enterNewScope(context, node, signature.parameters, signature.typeParameters);
|
|
47737
47882
|
} else {
|
|
47738
47883
|
let typeParameters = isConditionalTypeNode(node) ? getInferTypeParameters(node) : [getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))];
|
|
47739
47884
|
return enterNewScope(
|
|
@@ -47757,7 +47902,7 @@ ${lanes.join(`
|
|
|
47757
47902
|
getModuleSpecifierOverride(syntacticContext, parent2, lit) {
|
|
47758
47903
|
let context = syntacticContext;
|
|
47759
47904
|
if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) {
|
|
47760
|
-
let name = lit.text, nodeSymbol = getNodeLinks(parent2).resolvedSymbol, meaning = parent2.isTypeOf ? 111551 : 788968, parentSymbol = nodeSymbol && isSymbolAccessible(
|
|
47905
|
+
let name = lit.text, originalName = name, nodeSymbol = getNodeLinks(parent2).resolvedSymbol, meaning = parent2.isTypeOf ? 111551 : 788968, parentSymbol = nodeSymbol && isSymbolAccessible(
|
|
47761
47906
|
nodeSymbol,
|
|
47762
47907
|
context.enclosingDeclaration,
|
|
47763
47908
|
meaning,
|
|
@@ -47776,7 +47921,8 @@ ${lanes.join(`
|
|
|
47776
47921
|
let targetFile = getExternalModuleFileFromDeclaration(parent2);
|
|
47777
47922
|
targetFile && (name = getSpecifierForModuleSymbol(targetFile.symbol, context));
|
|
47778
47923
|
}
|
|
47779
|
-
|
|
47924
|
+
if (name.includes("/node_modules/") && (context.encounteredError = !0, context.tracker.reportLikelyUnsafeImportRequiredError && context.tracker.reportLikelyUnsafeImportRequiredError(name)), name !== originalName)
|
|
47925
|
+
return name;
|
|
47780
47926
|
}
|
|
47781
47927
|
},
|
|
47782
47928
|
canReuseTypeNode(context, typeNode) {
|
|
@@ -48282,7 +48428,7 @@ ${lanes.join(`
|
|
|
48282
48428
|
function shouldWriteTypeOfFunctionSymbol() {
|
|
48283
48429
|
var _a3;
|
|
48284
48430
|
let isStaticMethodSymbol = !!(symbol.flags & 8192) && // typeof static method
|
|
48285
|
-
some(symbol.declarations, (declaration) => isStatic(declaration)), isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || // is exported function symbol
|
|
48431
|
+
some(symbol.declarations, (declaration) => isStatic(declaration) && !isLateBindableIndexSignature(getNameOfDeclaration(declaration))), isNonLocalFunctionSymbol = !!(symbol.flags & 16) && (symbol.parent || // is exported function symbol
|
|
48286
48432
|
forEach(
|
|
48287
48433
|
symbol.declarations,
|
|
48288
48434
|
(declaration) => declaration.parent.kind === 307 || declaration.parent.kind === 268
|
|
@@ -48515,6 +48661,36 @@ ${lanes.join(`
|
|
|
48515
48661
|
ids.unshift(state.right), state = state.left;
|
|
48516
48662
|
return ids.unshift(state), ids;
|
|
48517
48663
|
}
|
|
48664
|
+
function indexInfoToObjectComputedNamesOrSignatureDeclaration(indexInfo, context2, typeNode) {
|
|
48665
|
+
if (indexInfo.components && every(indexInfo.components, (e) => {
|
|
48666
|
+
var _a2;
|
|
48667
|
+
return !!(e.name && isComputedPropertyName(e.name) && isEntityNameExpression(e.name.expression) && context2.enclosingDeclaration && ((_a2 = isEntityNameVisible(
|
|
48668
|
+
e.name.expression,
|
|
48669
|
+
context2.enclosingDeclaration,
|
|
48670
|
+
/*shouldComputeAliasToMakeVisible*/
|
|
48671
|
+
!1
|
|
48672
|
+
)) == null ? void 0 : _a2.accessibility) === 0);
|
|
48673
|
+
})) {
|
|
48674
|
+
let newComponents = filter(indexInfo.components, (e) => !hasLateBindableName(e));
|
|
48675
|
+
return map(newComponents, (e) => (trackComputedName(e.name.expression, context2.enclosingDeclaration, context2), setTextRange2(
|
|
48676
|
+
context2,
|
|
48677
|
+
factory.createPropertySignature(
|
|
48678
|
+
indexInfo.isReadonly ? [factory.createModifier(
|
|
48679
|
+
148
|
|
48680
|
+
/* ReadonlyKeyword */
|
|
48681
|
+
)] : void 0,
|
|
48682
|
+
e.name,
|
|
48683
|
+
(isPropertySignature(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken(
|
|
48684
|
+
58
|
|
48685
|
+
/* QuestionToken */
|
|
48686
|
+
) : void 0,
|
|
48687
|
+
typeNode || typeToTypeNodeHelper(getTypeOfSymbol(e.symbol), context2)
|
|
48688
|
+
),
|
|
48689
|
+
e
|
|
48690
|
+
)));
|
|
48691
|
+
}
|
|
48692
|
+
return [indexInfoToIndexSignatureDeclarationHelper(indexInfo, context2, typeNode)];
|
|
48693
|
+
}
|
|
48518
48694
|
function createTypeNodesFromResolvedType(resolvedType) {
|
|
48519
48695
|
if (checkTruncationLength(context))
|
|
48520
48696
|
return context.flags & 1 ? [addSyntheticTrailingComment(factory.createNotEmittedTypeElement(), 3, "elided")] : [factory.createPropertySignature(
|
|
@@ -48532,7 +48708,7 @@ ${lanes.join(`
|
|
|
48532
48708
|
for (let signature of resolvedType.constructSignatures)
|
|
48533
48709
|
signature.flags & 4 || typeElements.push(signatureToSignatureDeclarationHelper(signature, 180, context));
|
|
48534
48710
|
for (let info of resolvedType.indexInfos)
|
|
48535
|
-
typeElements.push(
|
|
48711
|
+
typeElements.push(...indexInfoToObjectComputedNamesOrSignatureDeclaration(info, context, resolvedType.objectFlags & 1024 ? createElidedInformationPlaceholder(context) : void 0));
|
|
48536
48712
|
let properties = resolvedType.properties;
|
|
48537
48713
|
if (!properties)
|
|
48538
48714
|
return typeElements;
|
|
@@ -48607,7 +48783,7 @@ ${lanes.join(`
|
|
|
48607
48783
|
if (context.enclosingDeclaration = saveEnclosingDeclaration, context.approximateLength += symbolName(propertySymbol).length + 1, propertySymbol.flags & 98304) {
|
|
48608
48784
|
let writeType = getWriteTypeOfSymbol(propertySymbol);
|
|
48609
48785
|
if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
|
|
48610
|
-
let getterDeclaration = getDeclarationOfKind(
|
|
48786
|
+
let symbolMapper = getSymbolLinks(propertySymbol).mapper, getterDeclaration = getDeclarationOfKind(
|
|
48611
48787
|
propertySymbol,
|
|
48612
48788
|
177
|
|
48613
48789
|
/* GetAccessor */
|
|
@@ -48615,7 +48791,7 @@ ${lanes.join(`
|
|
|
48615
48791
|
typeElements.push(
|
|
48616
48792
|
setCommentRange2(
|
|
48617
48793
|
context,
|
|
48618
|
-
signatureToSignatureDeclarationHelper(getterSignature, 177, context, { name: propertyName }),
|
|
48794
|
+
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(getterSignature, symbolMapper) : getterSignature, 177, context, { name: propertyName }),
|
|
48619
48795
|
getterDeclaration
|
|
48620
48796
|
)
|
|
48621
48797
|
);
|
|
@@ -48627,7 +48803,7 @@ ${lanes.join(`
|
|
|
48627
48803
|
typeElements.push(
|
|
48628
48804
|
setCommentRange2(
|
|
48629
48805
|
context,
|
|
48630
|
-
signatureToSignatureDeclarationHelper(setterSignature, 178, context, { name: propertyName }),
|
|
48806
|
+
signatureToSignatureDeclarationHelper(symbolMapper ? instantiateSignature(setterSignature, symbolMapper) : setterSignature, 178, context, { name: propertyName }),
|
|
48631
48807
|
setterDeclaration
|
|
48632
48808
|
)
|
|
48633
48809
|
);
|
|
@@ -49116,7 +49292,7 @@ ${lanes.join(`
|
|
|
49116
49292
|
function trackComputedName(accessExpression, enclosingDeclaration, context) {
|
|
49117
49293
|
if (!context.tracker.canTrackSymbol) return;
|
|
49118
49294
|
let firstIdentifier = getFirstIdentifier(accessExpression), name = resolveName(
|
|
49119
|
-
|
|
49295
|
+
enclosingDeclaration,
|
|
49120
49296
|
firstIdentifier.escapedText,
|
|
49121
49297
|
1160127,
|
|
49122
49298
|
/*nameNotFoundMessage*/
|
|
@@ -49124,12 +49300,30 @@ ${lanes.join(`
|
|
|
49124
49300
|
/*isUse*/
|
|
49125
49301
|
!0
|
|
49126
49302
|
);
|
|
49127
|
-
|
|
49128
|
-
|
|
49129
|
-
|
|
49130
|
-
|
|
49131
|
-
|
|
49132
|
-
|
|
49303
|
+
if (name)
|
|
49304
|
+
context.tracker.trackSymbol(
|
|
49305
|
+
name,
|
|
49306
|
+
enclosingDeclaration,
|
|
49307
|
+
111551
|
|
49308
|
+
/* Value */
|
|
49309
|
+
);
|
|
49310
|
+
else {
|
|
49311
|
+
let fallback = resolveName(
|
|
49312
|
+
firstIdentifier,
|
|
49313
|
+
firstIdentifier.escapedText,
|
|
49314
|
+
1160127,
|
|
49315
|
+
/*nameNotFoundMessage*/
|
|
49316
|
+
void 0,
|
|
49317
|
+
/*isUse*/
|
|
49318
|
+
!0
|
|
49319
|
+
);
|
|
49320
|
+
fallback && context.tracker.trackSymbol(
|
|
49321
|
+
fallback,
|
|
49322
|
+
enclosingDeclaration,
|
|
49323
|
+
111551
|
|
49324
|
+
/* Value */
|
|
49325
|
+
);
|
|
49326
|
+
}
|
|
49133
49327
|
}
|
|
49134
49328
|
function lookupSymbolChain(symbol, context, meaning, yieldModuleSymbol) {
|
|
49135
49329
|
return context.tracker.trackSymbol(symbol, context.enclosingDeclaration, meaning), lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol);
|
|
@@ -49517,12 +49711,8 @@ ${lanes.join(`
|
|
|
49517
49711
|
var _a;
|
|
49518
49712
|
let result, addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration), decl = declaration ?? symbol.valueDeclaration ?? getDeclarationWithTypeAnnotation(symbol) ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]);
|
|
49519
49713
|
if (decl) {
|
|
49520
|
-
|
|
49521
|
-
|
|
49522
|
-
else if (hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608)) {
|
|
49523
|
-
let restore = addSymbolTypeToContext(context, symbol, type);
|
|
49524
|
-
result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context), restore();
|
|
49525
|
-
}
|
|
49714
|
+
let restore = addSymbolTypeToContext(context, symbol, type);
|
|
49715
|
+
isAccessor(decl) ? result = syntacticNodeBuilder.serializeTypeOfAccessor(decl, symbol, context) : hasInferredType(decl) && !nodeIsSynthesized(decl) && !(getObjectFlags(type) & 196608) && (result = syntacticNodeBuilder.serializeTypeOfDeclaration(decl, symbol, context)), restore();
|
|
49526
49716
|
}
|
|
49527
49717
|
return result || (addUndefinedForParameter && (type = getOptionalType(type)), result = serializeInferredTypeForDeclaration(symbol, context, type)), result ?? factory.createKeywordTypeNode(
|
|
49528
49718
|
133
|
|
@@ -49629,7 +49819,7 @@ ${lanes.join(`
|
|
|
49629
49819
|
/*context*/
|
|
49630
49820
|
void 0
|
|
49631
49821
|
);
|
|
49632
|
-
return
|
|
49822
|
+
return setTextRange2(context, updated, node2);
|
|
49633
49823
|
}
|
|
49634
49824
|
}
|
|
49635
49825
|
function serializeTypeName(context, node, isTypeOf, typeArguments) {
|
|
@@ -52215,7 +52405,7 @@ ${lanes.join(`
|
|
|
52215
52405
|
return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216));
|
|
52216
52406
|
}
|
|
52217
52407
|
function isReferenceToSomeType(type, targets) {
|
|
52218
|
-
if (type === void 0 ||
|
|
52408
|
+
if (type === void 0 || (getObjectFlags(type) & 4) === 0)
|
|
52219
52409
|
return !1;
|
|
52220
52410
|
for (let target of targets)
|
|
52221
52411
|
if (type.target === target)
|
|
@@ -54518,8 +54708,8 @@ ${lanes.join(`
|
|
|
54518
54708
|
/* Index */
|
|
54519
54709
|
);
|
|
54520
54710
|
}
|
|
54521
|
-
function createIndexInfo(keyType, type, isReadonly, declaration) {
|
|
54522
|
-
return { keyType, type, isReadonly, declaration };
|
|
54711
|
+
function createIndexInfo(keyType, type, isReadonly, declaration, components) {
|
|
54712
|
+
return { keyType, type, isReadonly, declaration, components };
|
|
54523
54713
|
}
|
|
54524
54714
|
function getIndexInfosOfSymbol(symbol) {
|
|
54525
54715
|
let indexSymbol = getIndexSymbol(symbol);
|
|
@@ -54894,6 +55084,8 @@ ${lanes.join(`
|
|
|
54894
55084
|
return checkNoTypeArguments(node), stringType;
|
|
54895
55085
|
case "Number":
|
|
54896
55086
|
return checkNoTypeArguments(node), numberType;
|
|
55087
|
+
case "BigInt":
|
|
55088
|
+
return checkNoTypeArguments(node), bigintType;
|
|
54897
55089
|
case "Boolean":
|
|
54898
55090
|
return checkNoTypeArguments(node), booleanType;
|
|
54899
55091
|
case "Void":
|
|
@@ -56914,7 +57106,7 @@ ${lanes.join(`
|
|
|
56914
57106
|
return result.links.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop), result.declarations = prop.declarations, result.links.nameType = getSymbolLinks(prop).nameType, result.links.syntheticOrigin = prop, result;
|
|
56915
57107
|
}
|
|
56916
57108
|
function getIndexInfoWithReadonly(info, readonly) {
|
|
56917
|
-
return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info;
|
|
57109
|
+
return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration, info.components) : info;
|
|
56918
57110
|
}
|
|
56919
57111
|
function createLiteralType(flags, value, symbol, regularType) {
|
|
56920
57112
|
let type = createTypeWithSymbol(flags, symbol);
|
|
@@ -57518,7 +57710,7 @@ ${lanes.join(`
|
|
|
57518
57710
|
return type.flags & 402915327 ? type : (type.restrictiveInstantiation || (type.restrictiveInstantiation = instantiateType(type, restrictiveMapper), type.restrictiveInstantiation.restrictiveInstantiation = type.restrictiveInstantiation), type.restrictiveInstantiation);
|
|
57519
57711
|
}
|
|
57520
57712
|
function instantiateIndexInfo(info, mapper) {
|
|
57521
|
-
return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration);
|
|
57713
|
+
return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration, info.components);
|
|
57522
57714
|
}
|
|
57523
57715
|
function isContextSensitive(node) {
|
|
57524
57716
|
switch (Debug.assert(node.kind !== 174 || isObjectLiteralMethod(node)), node.kind) {
|
|
@@ -57744,7 +57936,7 @@ ${lanes.join(`
|
|
|
57744
57936
|
target.symbol.declarations[0],
|
|
57745
57937
|
Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature
|
|
57746
57938
|
)
|
|
57747
|
-
),
|
|
57939
|
+
), (getFunctionFlags(node) & 2) === 0 && !getTypeOfPropertyOfType(sourceReturn, "then") && checkTypeRelatedTo(
|
|
57748
57940
|
createPromiseType(sourceReturn),
|
|
57749
57941
|
targetReturn,
|
|
57750
57942
|
relation,
|
|
@@ -60569,7 +60761,7 @@ ${lanes.join(`
|
|
|
60569
60761
|
}
|
|
60570
60762
|
function isObjectTypeWithInferableIndex(type) {
|
|
60571
60763
|
let objectFlags = getObjectFlags(type);
|
|
60572
|
-
return type.flags & 2097152 ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && type.symbol.flags & 7040 && !(type.symbol.flags & 32) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304) || !!(objectFlags & 1024 && isObjectTypeWithInferableIndex(type.source));
|
|
60764
|
+
return type.flags & 2097152 ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && (type.symbol.flags & 7040) !== 0 && !(type.symbol.flags & 32) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304) || !!(objectFlags & 1024 && isObjectTypeWithInferableIndex(type.source));
|
|
60573
60765
|
}
|
|
60574
60766
|
function createSymbolWithType(source, type) {
|
|
60575
60767
|
let symbol = createSymbol(
|
|
@@ -60652,7 +60844,7 @@ ${lanes.join(`
|
|
|
60652
60844
|
if (context)
|
|
60653
60845
|
for (let prop of getPropertiesOfContext(context))
|
|
60654
60846
|
members.has(prop.escapedName) || members.set(prop.escapedName, getUndefinedProperty(prop));
|
|
60655
|
-
let result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)));
|
|
60847
|
+
let result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly, info.declaration, info.components)));
|
|
60656
60848
|
return result.objectFlags |= getObjectFlags(type) & 266240, result;
|
|
60657
60849
|
}
|
|
60658
60850
|
function getWidenedType(type) {
|
|
@@ -61831,6 +62023,7 @@ ${lanes.join(`
|
|
|
61831
62023
|
return target.kind === 108;
|
|
61832
62024
|
case 235:
|
|
61833
62025
|
case 217:
|
|
62026
|
+
case 238:
|
|
61834
62027
|
return isMatchingReference(source.expression, target);
|
|
61835
62028
|
case 211:
|
|
61836
62029
|
case 212:
|
|
@@ -62036,7 +62229,7 @@ ${lanes.join(`
|
|
|
62036
62229
|
let isZero = isZeroBigInt(type);
|
|
62037
62230
|
return strictNullChecks ? isZero ? 12122884 : 7928580 : isZero ? 12581636 : 16775940;
|
|
62038
62231
|
}
|
|
62039
|
-
return flags & 16 ? strictNullChecks ? 16316168 : 16774920 : flags & 528 ? strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 : 7927560 : type === falseType || type === regularFalseType ? 12580616 : 16774920 : flags & 524288 ? callerOnlyNeeds & (strictNullChecks ? 83427327 : 83886079) ? getObjectFlags(type) & 16 && isEmptyObjectType(type) ? strictNullChecks ? 83427327 : 83886079 : isFunctionObjectType(type) ? strictNullChecks ? 7880640 : 16728e3 : strictNullChecks ? 7888800 : 16736160 :
|
|
62232
|
+
return flags & 16 ? strictNullChecks ? 16316168 : 16774920 : flags & 528 ? strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 : 7927560 : type === falseType || type === regularFalseType ? 12580616 : 16774920 : flags & 524288 ? (callerOnlyNeeds & (strictNullChecks ? 83427327 : 83886079)) === 0 ? 0 : getObjectFlags(type) & 16 && isEmptyObjectType(type) ? strictNullChecks ? 83427327 : 83886079 : isFunctionObjectType(type) ? strictNullChecks ? 7880640 : 16728e3 : strictNullChecks ? 7888800 : 16736160 : flags & 16384 ? 9830144 : flags & 32768 ? 26607360 : flags & 65536 ? 42917664 : flags & 12288 ? strictNullChecks ? 7925520 : 16772880 : flags & 67108864 ? strictNullChecks ? 7888800 : 16736160 : flags & 131072 ? 0 : flags & 1048576 ? reduceLeft(
|
|
62040
62233
|
type.types,
|
|
62041
62234
|
(facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds),
|
|
62042
62235
|
0
|
|
@@ -63455,6 +63648,7 @@ ${lanes.join(`
|
|
|
63455
63648
|
return neverType;
|
|
63456
63649
|
if (checkDerived)
|
|
63457
63650
|
return filterType(type, (t) => !isTypeDerivedFrom(t, candidate));
|
|
63651
|
+
type = type.flags & 2 ? unknownUnionType : type;
|
|
63458
63652
|
let trueType2 = getNarrowedType(
|
|
63459
63653
|
type,
|
|
63460
63654
|
candidate,
|
|
@@ -63463,7 +63657,7 @@ ${lanes.join(`
|
|
|
63463
63657
|
/*checkDerived*/
|
|
63464
63658
|
!1
|
|
63465
63659
|
);
|
|
63466
|
-
return filterType(type, (t) => !isTypeSubsetOf(t, trueType2));
|
|
63660
|
+
return recombineUnknownType(filterType(type, (t) => !isTypeSubsetOf(t, trueType2)));
|
|
63467
63661
|
}
|
|
63468
63662
|
if (type.flags & 3 || type === candidate)
|
|
63469
63663
|
return candidate;
|
|
@@ -63560,6 +63754,7 @@ ${lanes.join(`
|
|
|
63560
63754
|
return narrowTypeByCallExpression(type, expr, assumeTrue);
|
|
63561
63755
|
case 217:
|
|
63562
63756
|
case 235:
|
|
63757
|
+
case 238:
|
|
63563
63758
|
return narrowType(type, expr.expression, assumeTrue);
|
|
63564
63759
|
case 226:
|
|
63565
63760
|
return narrowTypeByBinaryExpression(type, expr, assumeTrue);
|
|
@@ -63870,15 +64065,18 @@ ${lanes.join(`
|
|
|
63870
64065
|
/*isUse*/
|
|
63871
64066
|
!0
|
|
63872
64067
|
)), jsxFactorySym && (jsxFactorySym.isReferenced = -1, canCollectSymbolAliasAccessabilityData && jsxFactorySym.flags & 2097152 && !getTypeOnlyAliasDeclaration(jsxFactorySym) && markAliasSymbolAsReferenced(jsxFactorySym)), isJsxOpeningFragment(node)) {
|
|
63873
|
-
let file = getSourceFileOfNode(node),
|
|
63874
|
-
|
|
63875
|
-
|
|
63876
|
-
|
|
63877
|
-
|
|
63878
|
-
|
|
63879
|
-
|
|
63880
|
-
|
|
63881
|
-
|
|
64068
|
+
let file = getSourceFileOfNode(node), entity = getJsxFactoryEntity(file);
|
|
64069
|
+
if (entity) {
|
|
64070
|
+
let localJsxNamespace = getFirstIdentifier(entity).escapedText;
|
|
64071
|
+
resolveName(
|
|
64072
|
+
jsxFactoryLocation,
|
|
64073
|
+
localJsxNamespace,
|
|
64074
|
+
shouldFactoryRefErr ? 111551 : 111167,
|
|
64075
|
+
jsxFactoryRefErr,
|
|
64076
|
+
/*isUse*/
|
|
64077
|
+
!0
|
|
64078
|
+
);
|
|
64079
|
+
}
|
|
63882
64080
|
}
|
|
63883
64081
|
}
|
|
63884
64082
|
}
|
|
@@ -64202,7 +64400,7 @@ ${lanes.join(`
|
|
|
64202
64400
|
));
|
|
64203
64401
|
}
|
|
64204
64402
|
function checkNestedBlockScopedBinding(node, symbol) {
|
|
64205
|
-
if (languageVersion >= 2 ||
|
|
64403
|
+
if (languageVersion >= 2 || (symbol.flags & 34) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299)
|
|
64206
64404
|
return;
|
|
64207
64405
|
let container = getEnclosingBlockScopeContainer(symbol.valueDeclaration), isCaptured = isInsideFunctionOrInstancePropertyInitializer(node, container), enclosingIterationStatement = getEnclosingIterationStatement(container);
|
|
64208
64406
|
if (enclosingIterationStatement) {
|
|
@@ -65676,18 +65874,31 @@ ${lanes.join(`
|
|
|
65676
65874
|
/* ESSymbol */
|
|
65677
65875
|
);
|
|
65678
65876
|
}
|
|
65877
|
+
function isSymbolWithComputedName(symbol) {
|
|
65878
|
+
var _a;
|
|
65879
|
+
let firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0];
|
|
65880
|
+
return firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name);
|
|
65881
|
+
}
|
|
65679
65882
|
function getObjectLiteralIndexInfo(isReadonly, offset, properties, keyType) {
|
|
65680
|
-
|
|
65883
|
+
var _a;
|
|
65884
|
+
let propTypes = [], components;
|
|
65681
65885
|
for (let i = offset; i < properties.length; i++) {
|
|
65682
65886
|
let prop = properties[i];
|
|
65683
|
-
(keyType === stringType && !isSymbolWithSymbolName(prop) || keyType === numberType && isSymbolWithNumericName(prop) || keyType === esSymbolType && isSymbolWithSymbolName(prop)) && propTypes.push(getTypeOfSymbol(properties[i]));
|
|
65887
|
+
(keyType === stringType && !isSymbolWithSymbolName(prop) || keyType === numberType && isSymbolWithNumericName(prop) || keyType === esSymbolType && isSymbolWithSymbolName(prop)) && (propTypes.push(getTypeOfSymbol(properties[i])), isSymbolWithComputedName(properties[i]) && (components = append(components, (_a = properties[i].declarations) == null ? void 0 : _a[0])));
|
|
65684
65888
|
}
|
|
65685
65889
|
let unionType = propTypes.length ? getUnionType(
|
|
65686
65890
|
propTypes,
|
|
65687
65891
|
2
|
|
65688
65892
|
/* Subtype */
|
|
65689
65893
|
) : undefinedType;
|
|
65690
|
-
return createIndexInfo(
|
|
65894
|
+
return createIndexInfo(
|
|
65895
|
+
keyType,
|
|
65896
|
+
unionType,
|
|
65897
|
+
isReadonly,
|
|
65898
|
+
/*declaration*/
|
|
65899
|
+
void 0,
|
|
65900
|
+
components
|
|
65901
|
+
);
|
|
65691
65902
|
}
|
|
65692
65903
|
function getImmediateAliasedSymbol(symbol) {
|
|
65693
65904
|
Debug.assert((symbol.flags & 2097152) !== 0, "Should only get Alias here.");
|
|
@@ -66063,7 +66274,7 @@ ${lanes.join(`
|
|
|
66063
66274
|
return getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer, jsxNamespace);
|
|
66064
66275
|
}
|
|
66065
66276
|
function getJsxElementChildrenPropertyName(jsxNamespace) {
|
|
66066
|
-
return getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace);
|
|
66277
|
+
return compilerOptions.jsx === 4 || compilerOptions.jsx === 5 ? "children" : getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace);
|
|
66067
66278
|
}
|
|
66068
66279
|
function getUninstantiatedJsxSignaturesOfType(elementType, caller) {
|
|
66069
66280
|
if (elementType.flags & 4)
|
|
@@ -67290,7 +67501,8 @@ ${lanes.join(`
|
|
|
67290
67501
|
}
|
|
67291
67502
|
}
|
|
67292
67503
|
function getEffectiveCheckNode(argument) {
|
|
67293
|
-
|
|
67504
|
+
let flags = isInJSFile(argument) ? -2147483615 : 33;
|
|
67505
|
+
return skipOuterExpressions(argument, flags);
|
|
67294
67506
|
}
|
|
67295
67507
|
function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors2, containingMessageChain, inferenceContext) {
|
|
67296
67508
|
let errorOutputContainer = { errors: void 0, skipLogging: !0 };
|
|
@@ -67579,9 +67791,13 @@ ${lanes.join(`
|
|
|
67579
67791
|
let args = getEffectiveCallArguments(node), isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters;
|
|
67580
67792
|
!isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) && (argCheckMode = 4);
|
|
67581
67793
|
let signatureHelpTrailingComma = !!(checkMode & 16) && node.kind === 213 && node.arguments.hasTrailingComma;
|
|
67582
|
-
|
|
67794
|
+
candidates.length > 1 && (result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma)), result || (result = chooseOverload(candidates, assignableRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma));
|
|
67795
|
+
let links = getNodeLinks(node);
|
|
67796
|
+
if (links.resolvedSignature !== resolvingSignature && !candidatesOutArray)
|
|
67797
|
+
return Debug.assert(links.resolvedSignature), links.resolvedSignature;
|
|
67798
|
+
if (result)
|
|
67583
67799
|
return result;
|
|
67584
|
-
if (result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode),
|
|
67800
|
+
if (result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode), links.resolvedSignature = result, reportErrors2) {
|
|
67585
67801
|
if (!headMessage && isInstanceof && (headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method), candidatesForArgumentError)
|
|
67586
67802
|
if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) {
|
|
67587
67803
|
let last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1], chain;
|
|
@@ -68232,7 +68448,7 @@ ${lanes.join(`
|
|
|
68232
68448
|
);
|
|
68233
68449
|
if (jsxFactorySymbol === void 0) return sourceFileLinks.jsxFragmentType = errorType;
|
|
68234
68450
|
if (jsxFactorySymbol.escapedName === ReactNames.Fragment) return sourceFileLinks.jsxFragmentType = getTypeOfSymbol(jsxFactorySymbol);
|
|
68235
|
-
let resolvedAlias = jsxFactorySymbol.flags & 2097152 ?
|
|
68451
|
+
let resolvedAlias = (jsxFactorySymbol.flags & 2097152) === 0 ? jsxFactorySymbol : resolveAlias(jsxFactorySymbol), reactExports = jsxFactorySymbol && getExportsOfSymbol(resolvedAlias), typeSymbol = reactExports && getSymbol2(
|
|
68236
68452
|
reactExports,
|
|
68237
68453
|
ReactNames.Fragment,
|
|
68238
68454
|
2
|
|
@@ -68344,7 +68560,7 @@ ${lanes.join(`
|
|
|
68344
68560
|
checkMode || 0
|
|
68345
68561
|
/* Normal */
|
|
68346
68562
|
);
|
|
68347
|
-
return resolutionStart = saveResolutionStart, result !== resolvingSignature && (links.resolvedSignature
|
|
68563
|
+
return resolutionStart = saveResolutionStart, result !== resolvingSignature && (links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached), result;
|
|
68348
68564
|
}
|
|
68349
68565
|
function isJSConstructor(node) {
|
|
68350
68566
|
var _a;
|
|
@@ -68626,11 +68842,14 @@ ${lanes.join(`
|
|
|
68626
68842
|
function checkAssertion(node, checkMode) {
|
|
68627
68843
|
if (node.kind === 216) {
|
|
68628
68844
|
let file = getSourceFileOfNode(node);
|
|
68629
|
-
file && fileExtensionIsOneOf(file.fileName, [
|
|
68845
|
+
if (file && fileExtensionIsOneOf(file.fileName, [
|
|
68630
68846
|
".cts",
|
|
68631
68847
|
".mts"
|
|
68632
68848
|
/* Mts */
|
|
68633
|
-
]) && grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead)
|
|
68849
|
+
]) && grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead), compilerOptions.erasableSyntaxOnly) {
|
|
68850
|
+
let start = skipTrivia(file.text, node.pos), end = node.expression.pos;
|
|
68851
|
+
diagnostics.add(createFileDiagnostic(file, start, end - start, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled));
|
|
68852
|
+
}
|
|
68634
68853
|
}
|
|
68635
68854
|
return checkAssertionWorker(node, checkMode);
|
|
68636
68855
|
}
|
|
@@ -68802,7 +69021,7 @@ ${lanes.join(`
|
|
|
68802
69021
|
else return error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"), errorType;
|
|
68803
69022
|
}
|
|
68804
69023
|
function checkImportMetaProperty(node) {
|
|
68805
|
-
|
|
69024
|
+
100 <= moduleKind && moduleKind <= 199 ? getSourceFileOfNode(node).impliedNodeFormat !== 99 && error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output) : moduleKind < 6 && moduleKind !== 4 && error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_or_nodenext);
|
|
68806
69025
|
let file = getSourceFileOfNode(node);
|
|
68807
69026
|
return Debug.assert(!!(file.flags & 8388608), "Containing file is missing import meta node flag."), node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
|
|
68808
69027
|
}
|
|
@@ -69474,7 +69693,7 @@ ${lanes.join(`
|
|
|
69474
69693
|
let operandConstraint = getBaseConstraintOrType(checkExpressionCached(node.expression.expression)), notEqualFacts = getNotEqualFactsFromTypeofSwitch(0, 0, witnesses);
|
|
69475
69694
|
return operandConstraint.flags & 3 ? (556800 & notEqualFacts) === 556800 : !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);
|
|
69476
69695
|
}
|
|
69477
|
-
let type = checkExpressionCached(node.expression);
|
|
69696
|
+
let type = getBaseConstraintOrType(checkExpressionCached(node.expression));
|
|
69478
69697
|
if (!isLiteralType(type))
|
|
69479
69698
|
return !1;
|
|
69480
69699
|
let switchTypes = getSwitchClauseTypes(node);
|
|
@@ -69676,20 +69895,7 @@ ${lanes.join(`
|
|
|
69676
69895
|
checkSourceElement(node.body);
|
|
69677
69896
|
else {
|
|
69678
69897
|
let exprType = checkExpression(node.body), returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags);
|
|
69679
|
-
|
|
69680
|
-
let effectiveCheckNode = getEffectiveCheckNode(node.body);
|
|
69681
|
-
if ((functionFlags & 3) === 2) {
|
|
69682
|
-
let awaitedType = checkAwaitedType(
|
|
69683
|
-
exprType,
|
|
69684
|
-
/*withAlias*/
|
|
69685
|
-
!1,
|
|
69686
|
-
effectiveCheckNode,
|
|
69687
|
-
Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
|
|
69688
|
-
);
|
|
69689
|
-
checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);
|
|
69690
|
-
} else
|
|
69691
|
-
checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, effectiveCheckNode, effectiveCheckNode);
|
|
69692
|
-
}
|
|
69898
|
+
returnOrPromisedType && checkReturnExpression(node, returnOrPromisedType, node.body, node.body, exprType);
|
|
69693
69899
|
}
|
|
69694
69900
|
}
|
|
69695
69901
|
function checkArithmeticOperandType(operand, type, diagnostic, isAwaitValid = !1) {
|
|
@@ -69729,7 +69935,7 @@ ${lanes.join(`
|
|
|
69729
69935
|
return !1;
|
|
69730
69936
|
if (isReadonlySymbol(symbol)) {
|
|
69731
69937
|
if (symbol.flags & 4 && isAccessExpression(expr) && expr.expression.kind === 110) {
|
|
69732
|
-
let ctor =
|
|
69938
|
+
let ctor = getControlFlowContainer(expr);
|
|
69733
69939
|
if (!(ctor && (ctor.kind === 176 || isJSConstructor(ctor))))
|
|
69734
69940
|
return !0;
|
|
69735
69941
|
if (symbol.valueDeclaration) {
|
|
@@ -69754,7 +69960,7 @@ ${lanes.join(`
|
|
|
69754
69960
|
function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) {
|
|
69755
69961
|
let node = skipOuterExpressions(
|
|
69756
69962
|
expr,
|
|
69757
|
-
|
|
69963
|
+
39
|
|
69758
69964
|
/* Parentheses */
|
|
69759
69965
|
);
|
|
69760
69966
|
return node.kind !== 80 && !isAccessExpression(node) ? (error2(expr, invalidReferenceMessage), !1) : node.flags & 64 ? (error2(expr, invalidOptionalChainMessage), !1) : !0;
|
|
@@ -69799,6 +70005,7 @@ ${lanes.join(`
|
|
|
69799
70005
|
}
|
|
69800
70006
|
switch (moduleKind) {
|
|
69801
70007
|
case 100:
|
|
70008
|
+
case 101:
|
|
69802
70009
|
case 199:
|
|
69803
70010
|
if (sourceFile.impliedNodeFormat === 1) {
|
|
69804
70011
|
span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)), diagnostics.add(
|
|
@@ -69816,7 +70023,7 @@ ${lanes.join(`
|
|
|
69816
70023
|
// fallthrough
|
|
69817
70024
|
default:
|
|
69818
70025
|
span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos));
|
|
69819
|
-
let message = isAwaitExpression(node) ? Diagnostics.
|
|
70026
|
+
let message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;
|
|
69820
70027
|
diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)), hasError = !0;
|
|
69821
70028
|
break;
|
|
69822
70029
|
}
|
|
@@ -69825,7 +70032,7 @@ ${lanes.join(`
|
|
|
69825
70032
|
let sourceFile = getSourceFileOfNode(node);
|
|
69826
70033
|
if (!hasParseDiagnostics(sourceFile)) {
|
|
69827
70034
|
let span = getSpanOfTokenAtPosition(sourceFile, node.pos), message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules, diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message);
|
|
69828
|
-
if (container && container.kind !== 176 &&
|
|
70035
|
+
if (container && container.kind !== 176 && (getFunctionFlags(container) & 2) === 0) {
|
|
69829
70036
|
let relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async);
|
|
69830
70037
|
addRelatedInfo(diagnostic, relatedInfo);
|
|
69831
70038
|
}
|
|
@@ -70287,7 +70494,7 @@ ${lanes.join(`
|
|
|
70287
70494
|
isBinaryExpression(left) && (left.operatorToken.kind === 57 || left.operatorToken.kind === 56) && grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(left.operatorToken.kind), tokenToString(operatorToken.kind)), isBinaryExpression(right) && (right.operatorToken.kind === 57 || right.operatorToken.kind === 56) && grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind));
|
|
70288
70495
|
let leftTarget = skipOuterExpressions(
|
|
70289
70496
|
left,
|
|
70290
|
-
|
|
70497
|
+
63
|
|
70291
70498
|
/* All */
|
|
70292
70499
|
), nullishSemantics = getSyntacticNullishnessSemantics(leftTarget);
|
|
70293
70500
|
nullishSemantics !== 3 && (node.parent.kind === 226 ? error2(leftTarget, Diagnostics.This_binary_expression_is_never_nullish_Are_you_missing_parentheses) : nullishSemantics === 1 ? error2(leftTarget, Diagnostics.This_expression_is_always_nullish) : error2(leftTarget, Diagnostics.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish));
|
|
@@ -71393,7 +71600,7 @@ ${lanes.join(`
|
|
|
71393
71600
|
node,
|
|
71394
71601
|
31
|
|
71395
71602
|
/* ParameterPropertyModifier */
|
|
71396
|
-
) && (func.kind === 176 && nodeIsPresent(func.body) || error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation), func.kind === 176 && isIdentifier(node.name) && node.name.escapedText === "constructor" && error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name)), !node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body && error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature), node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new") && (func.parameters.indexOf(node) !== 0 && error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText), (func.kind === 176 || func.kind === 180 || func.kind === 185) && error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter), func.kind === 219 && error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter), (func.kind === 177 || func.kind === 178) && error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters)), node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType) && error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type);
|
|
71603
|
+
) && (compilerOptions.erasableSyntaxOnly && error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled), func.kind === 176 && nodeIsPresent(func.body) || error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation), func.kind === 176 && isIdentifier(node.name) && node.name.escapedText === "constructor" && error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name)), !node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body && error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature), node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new") && (func.parameters.indexOf(node) !== 0 && error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText), (func.kind === 176 || func.kind === 180 || func.kind === 185) && error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter), func.kind === 219 && error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter), (func.kind === 177 || func.kind === 178) && error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters)), node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType) && error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type);
|
|
71397
71604
|
}
|
|
71398
71605
|
function checkTypePredicate(node) {
|
|
71399
71606
|
let parent2 = getTypePredicateParent(node);
|
|
@@ -71476,7 +71683,7 @@ ${lanes.join(`
|
|
|
71476
71683
|
node,
|
|
71477
71684
|
64
|
|
71478
71685
|
/* Awaiter */
|
|
71479
|
-
), functionFlags & 3 && languageVersion < LanguageFeatureMinimumTarget.Generators && checkExternalEmitHelpers(
|
|
71686
|
+
), (functionFlags & 3) !== 0 && languageVersion < LanguageFeatureMinimumTarget.Generators && checkExternalEmitHelpers(
|
|
71480
71687
|
node,
|
|
71481
71688
|
128
|
|
71482
71689
|
/* Generator */
|
|
@@ -72919,7 +73126,7 @@ ${lanes.join(`
|
|
|
72919
73126
|
name && (checkCollisionWithRequireExportsInGeneratedCode(node, name), checkCollisionWithGlobalPromiseInGeneratedCode(node, name), recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name), recordPotentialCollisionWithReflectInGeneratedCode(node, name), isClassLike(node) ? (checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0), node.flags & 33554432 || checkClassNameCollisionWithObject(name)) : isEnumDeclaration(node) && checkTypeNameIsReserved(name, Diagnostics.Enum_name_cannot_be_0));
|
|
72920
73127
|
}
|
|
72921
73128
|
function checkVarDeclaredNamesNotShadowed(node) {
|
|
72922
|
-
if (getCombinedNodeFlagsCached(node) & 7 || isPartOfParameterDeclaration(node))
|
|
73129
|
+
if ((getCombinedNodeFlagsCached(node) & 7) !== 0 || isPartOfParameterDeclaration(node))
|
|
72923
73130
|
return;
|
|
72924
73131
|
let symbol = getSymbolOfDeclaration(node);
|
|
72925
73132
|
if (symbol.flags & 1) {
|
|
@@ -73806,25 +74013,54 @@ ${lanes.join(`
|
|
|
73806
74013
|
grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body);
|
|
73807
74014
|
return;
|
|
73808
74015
|
}
|
|
73809
|
-
let signature = getSignatureFromDeclaration(container), returnType = getReturnTypeOfSignature(signature)
|
|
74016
|
+
let signature = getSignatureFromDeclaration(container), returnType = getReturnTypeOfSignature(signature);
|
|
73810
74017
|
if (strictNullChecks || node.expression || returnType.flags & 131072) {
|
|
73811
74018
|
let exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
|
|
73812
74019
|
if (container.kind === 178)
|
|
73813
74020
|
node.expression && error2(node, Diagnostics.Setters_cannot_return_a_value);
|
|
73814
|
-
else if (container.kind === 176)
|
|
73815
|
-
node.expression
|
|
73816
|
-
|
|
73817
|
-
|
|
73818
|
-
|
|
73819
|
-
|
|
73820
|
-
!1,
|
|
73821
|
-
node,
|
|
73822
|
-
Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
|
|
73823
|
-
) : exprType;
|
|
73824
|
-
unwrappedReturnType && checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression);
|
|
74021
|
+
else if (container.kind === 176) {
|
|
74022
|
+
let exprType2 = node.expression ? checkExpressionCached(node.expression) : undefinedType;
|
|
74023
|
+
node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType2, returnType, node, node.expression) && error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
|
|
74024
|
+
} else if (getReturnTypeFromAnnotation(container)) {
|
|
74025
|
+
let unwrappedReturnType = unwrapReturnType(returnType, getFunctionFlags(container)) ?? returnType;
|
|
74026
|
+
checkReturnExpression(container, unwrappedReturnType, node, node.expression, exprType);
|
|
73825
74027
|
}
|
|
73826
74028
|
} else container.kind !== 176 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType) && error2(node, Diagnostics.Not_all_code_paths_return_a_value);
|
|
73827
74029
|
}
|
|
74030
|
+
function checkReturnExpression(container, unwrappedReturnType, node, expr, exprType, inConditionalExpression = !1) {
|
|
74031
|
+
let excludeJSDocTypeAssertions = isInJSFile(node), functionFlags = getFunctionFlags(container);
|
|
74032
|
+
if (expr) {
|
|
74033
|
+
let unwrappedExpr = skipParentheses(expr, excludeJSDocTypeAssertions);
|
|
74034
|
+
if (isConditionalExpression(unwrappedExpr)) {
|
|
74035
|
+
checkReturnExpression(
|
|
74036
|
+
container,
|
|
74037
|
+
unwrappedReturnType,
|
|
74038
|
+
node,
|
|
74039
|
+
unwrappedExpr.whenTrue,
|
|
74040
|
+
checkExpression(unwrappedExpr.whenTrue),
|
|
74041
|
+
/*inConditionalExpression*/
|
|
74042
|
+
!0
|
|
74043
|
+
), checkReturnExpression(
|
|
74044
|
+
container,
|
|
74045
|
+
unwrappedReturnType,
|
|
74046
|
+
node,
|
|
74047
|
+
unwrappedExpr.whenFalse,
|
|
74048
|
+
checkExpression(unwrappedExpr.whenFalse),
|
|
74049
|
+
/*inConditionalExpression*/
|
|
74050
|
+
!0
|
|
74051
|
+
);
|
|
74052
|
+
return;
|
|
74053
|
+
}
|
|
74054
|
+
}
|
|
74055
|
+
let inReturnStatement = node.kind === 253, unwrappedExprType = functionFlags & 2 ? checkAwaitedType(
|
|
74056
|
+
exprType,
|
|
74057
|
+
/*withAlias*/
|
|
74058
|
+
!1,
|
|
74059
|
+
node,
|
|
74060
|
+
Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member
|
|
74061
|
+
) : exprType, effectiveExpr = expr && getEffectiveCheckNode(expr);
|
|
74062
|
+
checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, inReturnStatement && !inConditionalExpression ? node : effectiveExpr, effectiveExpr);
|
|
74063
|
+
}
|
|
73828
74064
|
function checkWithStatement(node) {
|
|
73829
74065
|
checkGrammarStatementInAmbientContext(node) || node.flags & 65536 && grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block), checkExpression(node.expression);
|
|
73830
74066
|
let sourceFile = getSourceFileOfNode(node);
|
|
@@ -73875,7 +74111,7 @@ ${lanes.join(`
|
|
|
73875
74111
|
let blockLocals = catchClause.block.locals;
|
|
73876
74112
|
blockLocals && forEachKey(catchClause.locals, (caughtName) => {
|
|
73877
74113
|
let blockLocal = blockLocals.get(caughtName);
|
|
73878
|
-
blockLocal?.valueDeclaration && blockLocal.flags & 2 && grammarErrorOnNode(blockLocal.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, unescapeLeadingUnderscores(caughtName));
|
|
74114
|
+
blockLocal?.valueDeclaration && (blockLocal.flags & 2) !== 0 && grammarErrorOnNode(blockLocal.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, unescapeLeadingUnderscores(caughtName));
|
|
73879
74115
|
});
|
|
73880
74116
|
}
|
|
73881
74117
|
}
|
|
@@ -73897,7 +74133,7 @@ ${lanes.join(`
|
|
|
73897
74133
|
let typeDeclaration = symbol.valueDeclaration;
|
|
73898
74134
|
if (typeDeclaration && isClassLike(typeDeclaration)) {
|
|
73899
74135
|
for (let member of typeDeclaration.members)
|
|
73900
|
-
if (!isStatic(member) && !hasBindableName(member)) {
|
|
74136
|
+
if ((!isStaticIndex && !isStatic(member) || isStaticIndex && isStatic(member)) && !hasBindableName(member)) {
|
|
73901
74137
|
let symbol2 = getSymbolOfDeclaration(member);
|
|
73902
74138
|
checkIndexConstraintForProperty(type, symbol2, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol2));
|
|
73903
74139
|
}
|
|
@@ -74210,6 +74446,11 @@ ${lanes.join(`
|
|
|
74210
74446
|
}
|
|
74211
74447
|
function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, member, errorNode) {
|
|
74212
74448
|
let isJs = isInJSFile(node), nodeInAmbientContext = !!(node.flags & 33554432);
|
|
74449
|
+
if (memberHasOverrideModifier && member?.valueDeclaration && isClassElement(member.valueDeclaration) && member.valueDeclaration.name && isNonBindableDynamicName(member.valueDeclaration.name))
|
|
74450
|
+
return error2(
|
|
74451
|
+
errorNode,
|
|
74452
|
+
isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_name_is_dynamic : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_name_is_dynamic
|
|
74453
|
+
), 2;
|
|
74213
74454
|
if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
|
|
74214
74455
|
let thisType = memberIsStatic ? staticType : typeWithThis, baseType = memberIsStatic ? baseStaticType : baseWithThis, prop = getPropertyOfType(thisType, member.escapedName), baseProp = getPropertyOfType(baseType, member.escapedName), baseClassName = typeToString(baseWithThis);
|
|
74215
74456
|
if (prop && !baseProp && memberHasOverrideModifier) {
|
|
@@ -74668,7 +74909,7 @@ ${lanes.join(`
|
|
|
74668
74909
|
addLazyDiagnostic(() => checkEnumDeclarationWorker(node));
|
|
74669
74910
|
}
|
|
74670
74911
|
function checkEnumDeclarationWorker(node) {
|
|
74671
|
-
checkGrammarModifiers(node), checkCollisionsForDeclarationName(node, node.name), checkExportsOnMergedDeclarations(node), node.members.forEach(checkEnumMember), computeEnumMemberValues(node);
|
|
74912
|
+
checkGrammarModifiers(node), checkCollisionsForDeclarationName(node, node.name), checkExportsOnMergedDeclarations(node), node.members.forEach(checkEnumMember), compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432) && error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled), computeEnumMemberValues(node);
|
|
74672
74913
|
let enumSymbol = getSymbolOfDeclaration(node), firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind);
|
|
74673
74914
|
if (node === firstDeclaration) {
|
|
74674
74915
|
if (enumSymbol.declarations && enumSymbol.declarations.length > 1) {
|
|
@@ -74722,7 +74963,7 @@ ${lanes.join(`
|
|
|
74722
74963
|
checkExportsOnMergedDeclarations(node);
|
|
74723
74964
|
let symbol = getSymbolOfDeclaration(node);
|
|
74724
74965
|
if (symbol.flags & 512 && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) {
|
|
74725
|
-
if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator && error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName), ((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) {
|
|
74966
|
+
if (compilerOptions.erasableSyntaxOnly && error2(node.name, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled), getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator && error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName), ((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) {
|
|
74726
74967
|
let firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
|
|
74727
74968
|
firstNonAmbientClassOrFunc && (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc) ? error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged) : node.pos < firstNonAmbientClassOrFunc.pos && error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged));
|
|
74728
74969
|
let mergedClass = getDeclarationOfKind(
|
|
@@ -74960,10 +75201,18 @@ ${lanes.join(`
|
|
|
74960
75201
|
let validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration), override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0), isImportAttributes2 = declaration.attributes.token === 118;
|
|
74961
75202
|
if (validForTypeAttributes && override)
|
|
74962
75203
|
return;
|
|
74963
|
-
if ((moduleKind
|
|
74964
|
-
|
|
74965
|
-
|
|
74966
|
-
|
|
75204
|
+
if (!moduleSupportsImportAttributes(moduleKind))
|
|
75205
|
+
return grammarErrorOnNode(
|
|
75206
|
+
node,
|
|
75207
|
+
isImportAttributes2 ? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
|
|
75208
|
+
);
|
|
75209
|
+
if (moduleKind === 199 && !isImportAttributes2)
|
|
75210
|
+
return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
|
|
75211
|
+
if (declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier) === 1)
|
|
75212
|
+
return grammarErrorOnNode(
|
|
75213
|
+
node,
|
|
75214
|
+
isImportAttributes2 ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls
|
|
75215
|
+
);
|
|
74967
75216
|
if (isJSDocImportTag(declaration) || (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly))
|
|
74968
75217
|
return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
74969
75218
|
if (override)
|
|
@@ -74981,7 +75230,7 @@ ${lanes.join(`
|
|
|
74981
75230
|
node,
|
|
74982
75231
|
65536
|
|
74983
75232
|
/* ImportStar */
|
|
74984
|
-
)) : (resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier), resolvedModule && forEach(importClause.namedBindings.elements, checkImportBinding))), !importClause.isTypeOnly && moduleKind
|
|
75233
|
+
)) : (resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier), resolvedModule && forEach(importClause.namedBindings.elements, checkImportBinding))), !importClause.isTypeOnly && 101 <= moduleKind && moduleKind <= 199 && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node) && error2(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind])) : noUncheckedSideEffectImports && !importClause && resolveExternalModuleName(node, node.moduleSpecifier);
|
|
74985
75234
|
}
|
|
74986
75235
|
checkImportAttributes(node);
|
|
74987
75236
|
}
|
|
@@ -74993,7 +75242,7 @@ ${lanes.join(`
|
|
|
74993
75242
|
});
|
|
74994
75243
|
}
|
|
74995
75244
|
function checkImportEqualsDeclaration(node) {
|
|
74996
|
-
if (!checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module) && (checkGrammarModifiers(node), isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)))
|
|
75245
|
+
if (!checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module) && (checkGrammarModifiers(node), compilerOptions.erasableSyntaxOnly && !(node.flags & 33554432) && error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled), isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)))
|
|
74997
75246
|
if (checkImportBinding(node), markLinkedReferences(
|
|
74998
75247
|
node,
|
|
74999
75248
|
6
|
|
@@ -75083,6 +75332,7 @@ ${lanes.join(`
|
|
|
75083
75332
|
let illegalContextMessage = node.isExportEquals ? Diagnostics.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration : Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration;
|
|
75084
75333
|
if (checkGrammarModuleElementContext(node, illegalContextMessage))
|
|
75085
75334
|
return;
|
|
75335
|
+
compilerOptions.erasableSyntaxOnly && node.isExportEquals && !(node.flags & 33554432) && error2(node, Diagnostics.This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled);
|
|
75086
75336
|
let container = node.parent.kind === 307 ? node.parent : node.parent.parent;
|
|
75087
75337
|
if (container.kind === 267 && !isAmbientModule(container)) {
|
|
75088
75338
|
node.isExportEquals ? error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace) : error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
|
|
@@ -75854,7 +76104,7 @@ ${lanes.join(`
|
|
|
75854
76104
|
name,
|
|
75855
76105
|
meaning,
|
|
75856
76106
|
/*ignoreErrors*/
|
|
75857
|
-
!
|
|
76107
|
+
!0,
|
|
75858
76108
|
/*dontResolveAlias*/
|
|
75859
76109
|
!0
|
|
75860
76110
|
);
|
|
@@ -75864,8 +76114,9 @@ ${lanes.join(`
|
|
|
75864
76114
|
return resolveEntityName(
|
|
75865
76115
|
name,
|
|
75866
76116
|
/*meaning*/
|
|
75867
|
-
1
|
|
75868
|
-
/*
|
|
76117
|
+
1,
|
|
76118
|
+
/*ignoreErrors*/
|
|
76119
|
+
!0
|
|
75869
76120
|
);
|
|
75870
76121
|
}
|
|
75871
76122
|
function getApplicableIndexSymbol(type, keyType) {
|
|
@@ -76014,8 +76265,9 @@ ${lanes.join(`
|
|
|
76014
76265
|
if (location && location.kind === 304)
|
|
76015
76266
|
return resolveEntityName(
|
|
76016
76267
|
location.name,
|
|
76017
|
-
2208703
|
|
76018
|
-
/*
|
|
76268
|
+
2208703,
|
|
76269
|
+
/*ignoreErrors*/
|
|
76270
|
+
!0
|
|
76019
76271
|
);
|
|
76020
76272
|
}
|
|
76021
76273
|
function getExportSpecifierLocalTargetSymbol(node) {
|
|
@@ -76025,15 +76277,17 @@ ${lanes.join(`
|
|
|
76025
76277
|
// Skip for invalid syntax like this: export { "x" }
|
|
76026
76278
|
resolveEntityName(
|
|
76027
76279
|
name,
|
|
76028
|
-
2998271
|
|
76029
|
-
/*
|
|
76280
|
+
2998271,
|
|
76281
|
+
/*ignoreErrors*/
|
|
76282
|
+
!0
|
|
76030
76283
|
)
|
|
76031
76284
|
);
|
|
76032
76285
|
} else
|
|
76033
76286
|
return resolveEntityName(
|
|
76034
76287
|
node,
|
|
76035
|
-
2998271
|
|
76036
|
-
/*
|
|
76288
|
+
2998271,
|
|
76289
|
+
/*ignoreErrors*/
|
|
76290
|
+
!0
|
|
76037
76291
|
);
|
|
76038
76292
|
}
|
|
76039
76293
|
function getTypeOfNode(node) {
|
|
@@ -76873,6 +77127,39 @@ ${lanes.join(`
|
|
|
76873
77127
|
result || (result = []);
|
|
76874
77128
|
for (let info of infoList) {
|
|
76875
77129
|
if (info.declaration || info === anyBaseTypeIndexInfo) continue;
|
|
77130
|
+
if (info.components && every(info.components, (e) => {
|
|
77131
|
+
var _a;
|
|
77132
|
+
return !!(e.name && isComputedPropertyName(e.name) && isEntityNameExpression(e.name.expression) && enclosing && ((_a = isEntityNameVisible(
|
|
77133
|
+
e.name.expression,
|
|
77134
|
+
enclosing,
|
|
77135
|
+
/*shouldComputeAliasToMakeVisible*/
|
|
77136
|
+
!1
|
|
77137
|
+
)) == null ? void 0 : _a.accessibility) === 0);
|
|
77138
|
+
})) {
|
|
77139
|
+
let newComponents = filter(info.components, (e) => !hasLateBindableName(e));
|
|
77140
|
+
result.push(...map(newComponents, (e) => {
|
|
77141
|
+
trackComputedName(e.name.expression);
|
|
77142
|
+
let mods = infoList === staticInfos ? [factory.createModifier(
|
|
77143
|
+
126
|
|
77144
|
+
/* StaticKeyword */
|
|
77145
|
+
)] : void 0;
|
|
77146
|
+
return factory.createPropertyDeclaration(
|
|
77147
|
+
append(mods, info.isReadonly ? factory.createModifier(
|
|
77148
|
+
148
|
|
77149
|
+
/* ReadonlyKeyword */
|
|
77150
|
+
) : void 0),
|
|
77151
|
+
e.name,
|
|
77152
|
+
(isPropertySignature(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken(
|
|
77153
|
+
58
|
|
77154
|
+
/* QuestionToken */
|
|
77155
|
+
) : void 0,
|
|
77156
|
+
nodeBuilder.typeToTypeNode(getTypeOfSymbol(e.symbol), enclosing, flags, internalFlags, tracker),
|
|
77157
|
+
/*initializer*/
|
|
77158
|
+
void 0
|
|
77159
|
+
);
|
|
77160
|
+
}));
|
|
77161
|
+
continue;
|
|
77162
|
+
}
|
|
76876
77163
|
let node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker);
|
|
76877
77164
|
node && infoList === staticInfos && (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(
|
|
76878
77165
|
126
|
|
@@ -76881,6 +77168,24 @@ ${lanes.join(`
|
|
|
76881
77168
|
}
|
|
76882
77169
|
}
|
|
76883
77170
|
return result;
|
|
77171
|
+
function trackComputedName(accessExpression) {
|
|
77172
|
+
if (!tracker.trackSymbol) return;
|
|
77173
|
+
let firstIdentifier = getFirstIdentifier(accessExpression), name = resolveName(
|
|
77174
|
+
firstIdentifier,
|
|
77175
|
+
firstIdentifier.escapedText,
|
|
77176
|
+
1160127,
|
|
77177
|
+
/*nameNotFoundMessage*/
|
|
77178
|
+
void 0,
|
|
77179
|
+
/*isUse*/
|
|
77180
|
+
!0
|
|
77181
|
+
);
|
|
77182
|
+
name && tracker.trackSymbol(
|
|
77183
|
+
name,
|
|
77184
|
+
enclosing,
|
|
77185
|
+
111551
|
|
77186
|
+
/* Value */
|
|
77187
|
+
);
|
|
77188
|
+
}
|
|
76884
77189
|
}
|
|
76885
77190
|
};
|
|
76886
77191
|
function isImportRequiredByAugmentation(node) {
|
|
@@ -77728,6 +78033,7 @@ ${lanes.join(`
|
|
|
77728
78033
|
if (!hasParseDiagnostics(sourceFile))
|
|
77729
78034
|
switch (isEffectiveExternalModule(sourceFile, compilerOptions) || diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)), moduleKind) {
|
|
77730
78035
|
case 100:
|
|
78036
|
+
case 101:
|
|
77731
78037
|
case 199:
|
|
77732
78038
|
if (sourceFile.impliedNodeFormat === 1) {
|
|
77733
78039
|
diagnostics.add(
|
|
@@ -77745,7 +78051,7 @@ ${lanes.join(`
|
|
|
77745
78051
|
// fallthrough
|
|
77746
78052
|
default:
|
|
77747
78053
|
diagnostics.add(
|
|
77748
|
-
createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.
|
|
78054
|
+
createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher)
|
|
77749
78055
|
);
|
|
77750
78056
|
break;
|
|
77751
78057
|
}
|
|
@@ -77876,7 +78182,7 @@ ${lanes.join(`
|
|
|
77876
78182
|
));
|
|
77877
78183
|
}
|
|
77878
78184
|
function checkGrammarForInvalidDynamicName(node, message) {
|
|
77879
|
-
if (isNonBindableDynamicName(node))
|
|
78185
|
+
if (isNonBindableDynamicName(node) && !isEntityNameExpression(isElementAccessExpression(node) ? skipParentheses(node.argumentExpression) : node.expression))
|
|
77880
78186
|
return grammarErrorOnNode(node, message);
|
|
77881
78187
|
}
|
|
77882
78188
|
function checkGrammarMethod(node) {
|
|
@@ -78227,13 +78533,13 @@ ${lanes.join(`
|
|
|
78227
78533
|
if (compilerOptions.verbatimModuleSyntax && moduleKind === 1)
|
|
78228
78534
|
return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
|
|
78229
78535
|
if (moduleKind === 5)
|
|
78230
|
-
return grammarErrorOnNode(node, Diagnostics.
|
|
78536
|
+
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext);
|
|
78231
78537
|
if (node.typeArguments)
|
|
78232
78538
|
return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments);
|
|
78233
78539
|
let nodeArguments = node.arguments;
|
|
78234
|
-
if (
|
|
78540
|
+
if (!(100 <= moduleKind && moduleKind <= 199) && moduleKind !== 99 && moduleKind !== 200 && (checkGrammarForDisallowedTrailingComma(nodeArguments), nodeArguments.length > 1)) {
|
|
78235
78541
|
let importAttributesArgument = nodeArguments[1];
|
|
78236
|
-
return grammarErrorOnNode(importAttributesArgument, Diagnostics.
|
|
78542
|
+
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_nodenext_or_preserve);
|
|
78237
78543
|
}
|
|
78238
78544
|
if (nodeArguments.length === 0 || nodeArguments.length > 2)
|
|
78239
78545
|
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments);
|
|
@@ -79898,7 +80204,7 @@ ${lanes.join(`
|
|
|
79898
80204
|
if (currentByte === -1) return setError("Invalid character in VLQ"), -1;
|
|
79899
80205
|
moreDigits = (currentByte & 32) !== 0, value = value | (currentByte & 31) << shiftCount, shiftCount += 5;
|
|
79900
80206
|
}
|
|
79901
|
-
return value & 1 ?
|
|
80207
|
+
return (value & 1) === 0 ? value = value >> 1 : (value = value >> 1, value = -value), value;
|
|
79902
80208
|
}
|
|
79903
80209
|
}
|
|
79904
80210
|
function sameMapping(left, right) {
|
|
@@ -81981,7 +82287,7 @@ ${lanes.join(`
|
|
|
81981
82287
|
return node.type && setTypeNode(updated.name, node.type), updated;
|
|
81982
82288
|
}
|
|
81983
82289
|
function visitParenthesizedExpression(node) {
|
|
81984
|
-
let innerExpression = skipOuterExpressions(node.expression, -
|
|
82290
|
+
let innerExpression = skipOuterExpressions(node.expression, -55);
|
|
81985
82291
|
if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) {
|
|
81986
82292
|
let expression = visitNode(node.expression, visitor, isExpression);
|
|
81987
82293
|
return Debug.assert(expression), factory2.createPartiallyEmittedExpression(expression, node);
|
|
@@ -82506,13 +82812,13 @@ ${lanes.join(`
|
|
|
82506
82812
|
return factory2.getGeneratedNameForNode(node);
|
|
82507
82813
|
}
|
|
82508
82814
|
function enableSubstitutionForNonQualifiedEnumMembers() {
|
|
82509
|
-
enabledSubstitutions & 8
|
|
82815
|
+
(enabledSubstitutions & 8) === 0 && (enabledSubstitutions |= 8, context.enableSubstitution(
|
|
82510
82816
|
80
|
|
82511
82817
|
/* Identifier */
|
|
82512
82818
|
));
|
|
82513
82819
|
}
|
|
82514
82820
|
function enableSubstitutionForNamespaceExports() {
|
|
82515
|
-
enabledSubstitutions & 2
|
|
82821
|
+
(enabledSubstitutions & 2) === 0 && (enabledSubstitutions |= 2, context.enableSubstitution(
|
|
82516
82822
|
80
|
|
82517
82823
|
/* Identifier */
|
|
82518
82824
|
), context.enableSubstitution(
|
|
@@ -83919,13 +84225,13 @@ ${lanes.join(`
|
|
|
83919
84225
|
}
|
|
83920
84226
|
}
|
|
83921
84227
|
function enableSubstitutionForClassAliases() {
|
|
83922
|
-
enabledSubstitutions & 1
|
|
84228
|
+
(enabledSubstitutions & 1) === 0 && (enabledSubstitutions |= 1, context.enableSubstitution(
|
|
83923
84229
|
80
|
|
83924
84230
|
/* Identifier */
|
|
83925
84231
|
), classAliases = []);
|
|
83926
84232
|
}
|
|
83927
84233
|
function enableSubstitutionForClassStaticThisOrSuperReference() {
|
|
83928
|
-
enabledSubstitutions & 2
|
|
84234
|
+
(enabledSubstitutions & 2) === 0 && (enabledSubstitutions |= 2, context.enableSubstitution(
|
|
83929
84235
|
110
|
|
83930
84236
|
/* ThisKeyword */
|
|
83931
84237
|
), context.enableEmitNotification(
|
|
@@ -86697,7 +87003,7 @@ ${lanes.join(`
|
|
|
86697
87003
|
return visitEachChild(node, argumentsVisitor, context);
|
|
86698
87004
|
}
|
|
86699
87005
|
function visitor(node) {
|
|
86700
|
-
if (
|
|
87006
|
+
if ((node.transformFlags & 256) === 0)
|
|
86701
87007
|
return lexicalArgumentsBinding ? argumentsVisitor(node) : node;
|
|
86702
87008
|
switch (node.kind) {
|
|
86703
87009
|
case 134:
|
|
@@ -87177,7 +87483,7 @@ ${lanes.join(`
|
|
|
87177
87483
|
}
|
|
87178
87484
|
}
|
|
87179
87485
|
function enableSubstitutionForAsyncMethodsWithSuper() {
|
|
87180
|
-
enabledSubstitutions & 1
|
|
87486
|
+
(enabledSubstitutions & 1) === 0 && (enabledSubstitutions |= 1, context.enableSubstitution(
|
|
87181
87487
|
213
|
|
87182
87488
|
/* CallExpression */
|
|
87183
87489
|
), context.enableSubstitution(
|
|
@@ -87501,7 +87807,7 @@ ${lanes.join(`
|
|
|
87501
87807
|
return visitEachChild(node, visitor, context);
|
|
87502
87808
|
}
|
|
87503
87809
|
function visitorWorker(node, expressionResultIsUnused2) {
|
|
87504
|
-
if (
|
|
87810
|
+
if ((node.transformFlags & 128) === 0)
|
|
87505
87811
|
return node;
|
|
87506
87812
|
switch (node.kind) {
|
|
87507
87813
|
case 223:
|
|
@@ -88431,7 +88737,7 @@ ${lanes.join(`
|
|
|
88431
88737
|
return statements;
|
|
88432
88738
|
}
|
|
88433
88739
|
function enableSubstitutionForAsyncMethodsWithSuper() {
|
|
88434
|
-
enabledSubstitutions & 1
|
|
88740
|
+
(enabledSubstitutions & 1) === 0 && (enabledSubstitutions |= 1, context.enableSubstitution(
|
|
88435
88741
|
213
|
|
88436
88742
|
/* CallExpression */
|
|
88437
88743
|
), context.enableSubstitution(
|
|
@@ -88566,7 +88872,7 @@ ${lanes.join(`
|
|
|
88566
88872
|
return node.isDeclarationFile ? node : visitEachChild(node, visitor, context);
|
|
88567
88873
|
}
|
|
88568
88874
|
function visitor(node) {
|
|
88569
|
-
if (
|
|
88875
|
+
if ((node.transformFlags & 64) === 0)
|
|
88570
88876
|
return node;
|
|
88571
88877
|
switch (node.kind) {
|
|
88572
88878
|
case 299:
|
|
@@ -88596,7 +88902,7 @@ ${lanes.join(`
|
|
|
88596
88902
|
return node.isDeclarationFile ? node : visitEachChild(node, visitor, context);
|
|
88597
88903
|
}
|
|
88598
88904
|
function visitor(node) {
|
|
88599
|
-
if (
|
|
88905
|
+
if ((node.transformFlags & 32) === 0)
|
|
88600
88906
|
return node;
|
|
88601
88907
|
switch (node.kind) {
|
|
88602
88908
|
case 213: {
|
|
@@ -88814,7 +89120,7 @@ ${lanes.join(`
|
|
|
88814
89120
|
return node.isDeclarationFile ? node : visitEachChild(node, visitor, context);
|
|
88815
89121
|
}
|
|
88816
89122
|
function visitor(node) {
|
|
88817
|
-
return node.transformFlags & 16 ? isLogicalOrCoalescingAssignmentExpression(node) ? transformLogicalAssignment(node) : visitEachChild(node, visitor, context)
|
|
89123
|
+
return (node.transformFlags & 16) === 0 ? node : isLogicalOrCoalescingAssignmentExpression(node) ? transformLogicalAssignment(node) : visitEachChild(node, visitor, context);
|
|
88818
89124
|
}
|
|
88819
89125
|
function transformLogicalAssignment(binaryExpression) {
|
|
88820
89126
|
let operator = binaryExpression.operatorToken, nonAssignmentOperator = getNonAssignmentOperatorForCompoundAssignment(operator.kind), left = skipParentheses(visitNode(binaryExpression.left, visitor, isLeftHandSideExpression)), assignmentTarget = left, right = skipParentheses(visitNode(binaryExpression.right, visitor, isExpression));
|
|
@@ -88873,7 +89179,7 @@ ${lanes.join(`
|
|
|
88873
89179
|
return addEmitHelpers(visited, context.readEmitHelpers()), exportVars = void 0, exportBindings = void 0, defaultExportBinding = void 0, visited;
|
|
88874
89180
|
}
|
|
88875
89181
|
function visitor(node) {
|
|
88876
|
-
if (
|
|
89182
|
+
if ((node.transformFlags & 4) === 0)
|
|
88877
89183
|
return node;
|
|
88878
89184
|
switch (node.kind) {
|
|
88879
89185
|
case 307:
|
|
@@ -90122,7 +90428,7 @@ ${lanes.join(`
|
|
|
90122
90428
|
return node.isDeclarationFile ? node : visitEachChild(node, visitor, context);
|
|
90123
90429
|
}
|
|
90124
90430
|
function visitor(node) {
|
|
90125
|
-
if (
|
|
90431
|
+
if ((node.transformFlags & 512) === 0)
|
|
90126
90432
|
return node;
|
|
90127
90433
|
switch (node.kind) {
|
|
90128
90434
|
case 226:
|
|
@@ -91744,7 +92050,7 @@ ${lanes.join(`
|
|
|
91744
92050
|
) ? 32 : 0
|
|
91745
92051
|
/* None */
|
|
91746
92052
|
), updated;
|
|
91747
|
-
if (convertedLoopState &&
|
|
92053
|
+
if (convertedLoopState && (node.declarationList.flags & 7) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) {
|
|
91748
92054
|
let assignments;
|
|
91749
92055
|
for (let decl of node.declarationList.declarations)
|
|
91750
92056
|
if (hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl), decl.initializer) {
|
|
@@ -92498,7 +92804,7 @@ ${lanes.join(`
|
|
|
92498
92804
|
);
|
|
92499
92805
|
isBlock(statement) && setOriginalNode(loopBody, statement);
|
|
92500
92806
|
let containsYield = (node.statement.transformFlags & 1048576) !== 0, emitFlags = 1048576;
|
|
92501
|
-
currentState.containsLexicalThis && (emitFlags |= 16), containsYield && hierarchyFacts & 4 && (emitFlags |= 524288);
|
|
92807
|
+
currentState.containsLexicalThis && (emitFlags |= 16), containsYield && (hierarchyFacts & 4) !== 0 && (emitFlags |= 524288);
|
|
92502
92808
|
let functionDeclaration = factory2.createVariableStatement(
|
|
92503
92809
|
/*modifiers*/
|
|
92504
92810
|
void 0,
|
|
@@ -93112,13 +93418,13 @@ ${lanes.join(`
|
|
|
93112
93418
|
previousOnEmitNode(hint, node, emitCallback);
|
|
93113
93419
|
}
|
|
93114
93420
|
function enableSubstitutionsForBlockScopedBindings() {
|
|
93115
|
-
enabledSubstitutions & 2
|
|
93421
|
+
(enabledSubstitutions & 2) === 0 && (enabledSubstitutions |= 2, context.enableSubstitution(
|
|
93116
93422
|
80
|
|
93117
93423
|
/* Identifier */
|
|
93118
93424
|
));
|
|
93119
93425
|
}
|
|
93120
93426
|
function enableSubstitutionsForCapturedThis() {
|
|
93121
|
-
enabledSubstitutions & 1
|
|
93427
|
+
(enabledSubstitutions & 1) === 0 && (enabledSubstitutions |= 1, context.enableSubstitution(
|
|
93122
93428
|
110
|
|
93123
93429
|
/* ThisKeyword */
|
|
93124
93430
|
), context.enableEmitNotification(
|
|
@@ -93250,7 +93556,7 @@ ${lanes.join(`
|
|
|
93250
93556
|
let renamedCatchVariables, renamedCatchVariableDeclarations, inGeneratorFunctionBody, inStatementContainingYield, blocks, blockOffsets, blockActions, blockStack, labelOffsets, labelExpressions, nextLabelId = 1, operations, operationArguments, operationLocations, state, blockIndex = 0, labelNumber = 0, labelNumbers, lastOperationWasAbrupt, lastOperationWasCompletion, clauses, statements, exceptionBlockStack, currentExceptionBlock, withBlockStack;
|
|
93251
93557
|
return chainBundle(context, transformSourceFile);
|
|
93252
93558
|
function transformSourceFile(node) {
|
|
93253
|
-
if (node.isDeclarationFile ||
|
|
93559
|
+
if (node.isDeclarationFile || (node.transformFlags & 2048) === 0)
|
|
93254
93560
|
return node;
|
|
93255
93561
|
let visited = visitEachChild(node, visitor, context);
|
|
93256
93562
|
return addEmitHelpers(visited, context.readEmitHelpers()), visited;
|
|
@@ -93545,7 +93851,7 @@ ${lanes.join(`
|
|
|
93545
93851
|
function visitYieldExpression(node) {
|
|
93546
93852
|
let resumeLabel = defineLabel(), expression = visitNode(node.expression, visitor, isExpression);
|
|
93547
93853
|
if (node.asteriskToken) {
|
|
93548
|
-
let iterator = getEmitFlags(node.expression) & 8388608
|
|
93854
|
+
let iterator = (getEmitFlags(node.expression) & 8388608) === 0 ? setTextRange(emitHelpers().createValuesHelper(expression), node) : expression;
|
|
93549
93855
|
emitYieldStar(
|
|
93550
93856
|
iterator,
|
|
93551
93857
|
/*location*/
|
|
@@ -97590,7 +97896,7 @@ ${lanes.join(`
|
|
|
97590
97896
|
case 213:
|
|
97591
97897
|
if (node === importsAndRequiresToRewriteOrShim?.[0])
|
|
97592
97898
|
return visitImportOrRequireCall(importsAndRequiresToRewriteOrShim.shift());
|
|
97593
|
-
|
|
97899
|
+
// fallthrough
|
|
97594
97900
|
default:
|
|
97595
97901
|
if (importsAndRequiresToRewriteOrShim?.length && rangeContainsRange(node, importsAndRequiresToRewriteOrShim[0]))
|
|
97596
97902
|
return visitEachChild(node, visitor, context);
|
|
@@ -98165,11 +98471,7 @@ ${lanes.join(`
|
|
|
98165
98471
|
function createParameterError(node) {
|
|
98166
98472
|
if (isSetAccessor(node.parent))
|
|
98167
98473
|
return createAccessorTypeError(node.parent);
|
|
98168
|
-
let addUndefined = resolver.requiresAddingImplicitUndefined(
|
|
98169
|
-
node,
|
|
98170
|
-
/*enclosingDeclaration*/
|
|
98171
|
-
void 0
|
|
98172
|
-
);
|
|
98474
|
+
let addUndefined = resolver.requiresAddingImplicitUndefined(node, node.parent);
|
|
98173
98475
|
if (!addUndefined && node.initializer)
|
|
98174
98476
|
return createExpressionError(node.initializer);
|
|
98175
98477
|
let message = addUndefined ? Diagnostics.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations : errorByDeclarationKind[node.kind], diag2 = createDiagnosticForNode(node, message), targetStr = getTextOfNode(
|
|
@@ -99502,6 +99804,7 @@ ${lanes.join(`
|
|
|
99502
99804
|
case 6:
|
|
99503
99805
|
case 5:
|
|
99504
99806
|
case 100:
|
|
99807
|
+
case 101:
|
|
99505
99808
|
case 199:
|
|
99506
99809
|
case 1:
|
|
99507
99810
|
return transformImpliedNodeFormatDependentModule;
|
|
@@ -101956,7 +102259,7 @@ ${lanes.join(`
|
|
|
101956
102259
|
function emitImportAttribute(node) {
|
|
101957
102260
|
emit(node.name), writePunctuation(":"), writeSpace();
|
|
101958
102261
|
let value = node.value;
|
|
101959
|
-
if (
|
|
102262
|
+
if ((getEmitFlags(value) & 1024) === 0) {
|
|
101960
102263
|
let commentRange = getCommentRange(value);
|
|
101961
102264
|
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
101962
102265
|
}
|
|
@@ -102089,7 +102392,7 @@ ${lanes.join(`
|
|
|
102089
102392
|
function emitPropertyAssignment(node) {
|
|
102090
102393
|
emit(node.name), writePunctuation(":"), writeSpace();
|
|
102091
102394
|
let initializer = node.initializer;
|
|
102092
|
-
if (
|
|
102395
|
+
if ((getEmitFlags(initializer) & 1024) === 0) {
|
|
102093
102396
|
let commentRange = getCommentRange(initializer);
|
|
102094
102397
|
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
102095
102398
|
}
|
|
@@ -102454,7 +102757,7 @@ ${lanes.join(`
|
|
|
102454
102757
|
format & 60 && previousSibling.end !== (parentNode ? parentNode.end : -1) && (getEmitFlags(previousSibling) & 2048 || emitLeadingCommentsOfPosition(previousSibling.end)), writeDelimiter(format);
|
|
102455
102758
|
let separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format);
|
|
102456
102759
|
if (separatingLineTerminatorCount > 0) {
|
|
102457
|
-
if (format & 131
|
|
102760
|
+
if ((format & 131) === 0 && (increaseIndent(), shouldDecreaseIndentAfterEmit = !0), shouldEmitInterveningComments && format & 60 && !positionIsSynthesized(child.pos)) {
|
|
102458
102761
|
let commentRange = getCommentRange(child);
|
|
102459
102762
|
emitTrailingCommentsOfPosition(
|
|
102460
102763
|
commentRange.pos,
|
|
@@ -103116,7 +103419,7 @@ ${lanes.join(`
|
|
|
103116
103419
|
/*isEmittedNode*/
|
|
103117
103420
|
node.kind !== 353
|
|
103118
103421
|
/* NotEmittedStatement */
|
|
103119
|
-
), (!skipLeadingComments || pos >= 0 && emitFlags & 1024) && (containerPos = pos), (!skipTrailingComments || end >= 0 && emitFlags & 2048) && (containerEnd = end, node.kind === 261 && (declarationListContainerEnd = end))), forEach(getSyntheticLeadingComments(node), emitLeadingSynthesizedComment), exitComment();
|
|
103422
|
+
), (!skipLeadingComments || pos >= 0 && (emitFlags & 1024) !== 0) && (containerPos = pos), (!skipTrailingComments || end >= 0 && (emitFlags & 2048) !== 0) && (containerEnd = end, node.kind === 261 && (declarationListContainerEnd = end))), forEach(getSyntheticLeadingComments(node), emitLeadingSynthesizedComment), exitComment();
|
|
103120
103423
|
}
|
|
103121
103424
|
function emitTrailingCommentsOfNode(node, emitFlags, pos, end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) {
|
|
103122
103425
|
enterComment();
|
|
@@ -103237,11 +103540,11 @@ ${lanes.join(`
|
|
|
103237
103540
|
}
|
|
103238
103541
|
function emitSourceMapsBeforeNode(node) {
|
|
103239
103542
|
let emitFlags = getEmitFlags(node), sourceMapRange = getSourceMapRange(node), source = sourceMapRange.source || sourceMapSource;
|
|
103240
|
-
node.kind !== 353 &&
|
|
103543
|
+
node.kind !== 353 && (emitFlags & 32) === 0 && sourceMapRange.pos >= 0 && emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)), emitFlags & 128 && (sourceMapsDisabled = !0);
|
|
103241
103544
|
}
|
|
103242
103545
|
function emitSourceMapsAfterNode(node) {
|
|
103243
103546
|
let emitFlags = getEmitFlags(node), sourceMapRange = getSourceMapRange(node);
|
|
103244
|
-
emitFlags & 128 && (sourceMapsDisabled = !1), node.kind !== 353 &&
|
|
103547
|
+
emitFlags & 128 && (sourceMapsDisabled = !1), node.kind !== 353 && (emitFlags & 64) === 0 && sourceMapRange.end >= 0 && emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
|
|
103245
103548
|
}
|
|
103246
103549
|
function skipSourceTrivia(source, pos) {
|
|
103247
103550
|
return source.skipTrivia ? source.skipTrivia(pos) : skipTrivia(source.text, pos);
|
|
@@ -103271,7 +103574,7 @@ ${lanes.join(`
|
|
|
103271
103574
|
if (sourceMapsDisabled || node && isInJsonFile(node))
|
|
103272
103575
|
return emitCallback(token, writer2, tokenPos);
|
|
103273
103576
|
let emitNode = node && node.emitNode, emitFlags = emitNode && emitNode.flags || 0, range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token], source = range && range.source || sourceMapSource;
|
|
103274
|
-
return tokenPos = skipSourceTrivia(source, range ? range.pos : tokenPos),
|
|
103577
|
+
return tokenPos = skipSourceTrivia(source, range ? range.pos : tokenPos), (emitFlags & 256) === 0 && tokenPos >= 0 && emitSourcePos(source, tokenPos), tokenPos = emitCallback(token, writer2, tokenPos), range && (tokenPos = range.end), (emitFlags & 512) === 0 && tokenPos >= 0 && emitSourcePos(source, tokenPos), tokenPos;
|
|
103275
103578
|
}
|
|
103276
103579
|
function setSourceMapSource(source) {
|
|
103277
103580
|
if (!sourceMapsDisabled) {
|
|
@@ -104117,45 +104420,6 @@ ${lanes.join(`
|
|
|
104117
104420
|
}
|
|
104118
104421
|
return resolutions;
|
|
104119
104422
|
}
|
|
104120
|
-
function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
|
|
104121
|
-
return forEachProjectReference(
|
|
104122
|
-
/*projectReferences*/
|
|
104123
|
-
void 0,
|
|
104124
|
-
resolvedProjectReferences,
|
|
104125
|
-
(resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2)
|
|
104126
|
-
);
|
|
104127
|
-
}
|
|
104128
|
-
function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) {
|
|
104129
|
-
let seenResolvedRefs;
|
|
104130
|
-
return worker(
|
|
104131
|
-
projectReferences,
|
|
104132
|
-
resolvedProjectReferences,
|
|
104133
|
-
/*parent*/
|
|
104134
|
-
void 0
|
|
104135
|
-
);
|
|
104136
|
-
function worker(projectReferences2, resolvedProjectReferences2, parent2) {
|
|
104137
|
-
if (cbRef) {
|
|
104138
|
-
let result = cbRef(projectReferences2, parent2);
|
|
104139
|
-
if (result) return result;
|
|
104140
|
-
}
|
|
104141
|
-
let skipChildren;
|
|
104142
|
-
return forEach(
|
|
104143
|
-
resolvedProjectReferences2,
|
|
104144
|
-
(resolvedRef, index) => {
|
|
104145
|
-
if (resolvedRef && seenResolvedRefs?.has(resolvedRef.sourceFile.path)) {
|
|
104146
|
-
(skipChildren ?? (skipChildren = /* @__PURE__ */ new Set())).add(resolvedRef);
|
|
104147
|
-
return;
|
|
104148
|
-
}
|
|
104149
|
-
let result = cbResolvedRef(resolvedRef, parent2, index);
|
|
104150
|
-
if (result || !resolvedRef) return result;
|
|
104151
|
-
(seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path);
|
|
104152
|
-
}
|
|
104153
|
-
) || forEach(
|
|
104154
|
-
resolvedProjectReferences2,
|
|
104155
|
-
(resolvedRef) => resolvedRef && !skipChildren?.has(resolvedRef) ? worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef) : void 0
|
|
104156
|
-
);
|
|
104157
|
-
}
|
|
104158
|
-
}
|
|
104159
104423
|
var inferredTypesContainingFile = "__inferred type names__.ts";
|
|
104160
104424
|
function getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName) {
|
|
104161
104425
|
let containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory;
|
|
@@ -104167,13 +104431,6 @@ ${lanes.join(`
|
|
|
104167
104431
|
path += (i === 2 ? "/" : "-") + components[i], i++;
|
|
104168
104432
|
return "@typescript/lib-" + path;
|
|
104169
104433
|
}
|
|
104170
|
-
function getLibNameFromLibReference(libReference) {
|
|
104171
|
-
return toFileNameLowerCase(libReference.fileName);
|
|
104172
|
-
}
|
|
104173
|
-
function getLibFileNameFromLibReference(libReference) {
|
|
104174
|
-
let libName = getLibNameFromLibReference(libReference);
|
|
104175
|
-
return libMap.get(libName);
|
|
104176
|
-
}
|
|
104177
104434
|
function isReferencedFile(reason) {
|
|
104178
104435
|
switch (reason?.kind) {
|
|
104179
104436
|
case 3:
|
|
@@ -104390,13 +104647,14 @@ ${lanes.join(`
|
|
|
104390
104647
|
typeScriptVersion: typeScriptVersion3
|
|
104391
104648
|
};
|
|
104392
104649
|
}
|
|
104393
|
-
function createProgram(
|
|
104650
|
+
function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
|
|
104394
104651
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
104395
|
-
let
|
|
104652
|
+
let _createProgramOptions = isArray(_rootNamesOrOptions) ? createCreateProgramOptions(_rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : _rootNamesOrOptions, { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3, host: createProgramOptionsHost } = _createProgramOptions, { oldProgram } = _createProgramOptions;
|
|
104653
|
+
_createProgramOptions = void 0, _rootNamesOrOptions = void 0;
|
|
104396
104654
|
for (let option of commandLineOptionOfCustomType)
|
|
104397
104655
|
if (hasProperty(options, option.name) && typeof options[option.name] == "string")
|
|
104398
104656
|
throw new Error(`${option.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`);
|
|
104399
|
-
let reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)), processingDefaultLibFiles, processingOtherFiles, files, symlinks,
|
|
104657
|
+
let reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)), processingDefaultLibFiles, processingOtherFiles, files, symlinks, typeChecker, classifiableNames, filesWithReferencesProcessed, cachedBindAndCheckDiagnosticsForFile, cachedDeclarationDiagnosticsForFile, programDiagnostics = createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax), automaticTypeDirectiveNames, automaticTypeDirectiveResolutions, resolvedLibReferences, resolvedLibProcessing, resolvedModules, resolvedModulesProcessing, resolvedTypeReferenceDirectiveNames, resolvedTypeReferenceDirectiveNamesProcessing, packageMap, maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth == "number" ? options.maxNodeModuleJsDepth : 0, currentNodeModulesDepth = 0, modulesWithElidedImports = /* @__PURE__ */ new Map(), sourceFilesFoundSearchingNodeModules = /* @__PURE__ */ new Map();
|
|
104400
104658
|
(_a = tracing) == null || _a.push(
|
|
104401
104659
|
tracing.Phase.Program,
|
|
104402
104660
|
"createProgram",
|
|
@@ -104404,7 +104662,7 @@ ${lanes.join(`
|
|
|
104404
104662
|
/*separateBeginAndEnd*/
|
|
104405
104663
|
!0
|
|
104406
104664
|
), mark("beforeProgram");
|
|
104407
|
-
let host =
|
|
104665
|
+
let host = createProgramOptionsHost || createCompilerHost(options), configParsingHost = parseConfigHostFromCompilerHostLike(host), skipDefaultLib = options.noLib, getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options)), defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName()), skipVerifyCompilerOptions = !1, currentDirectory = host.getCurrentDirectory(), supportedExtensions = getSupportedExtensions(options), supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions), hasEmitBlockingDiagnostics = /* @__PURE__ */ new Map(), _compilerOptionsObjectLiteralSyntax, _compilerOptionsPropertySyntax, moduleResolutionCache, actualResolveModuleNamesWorker, hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse;
|
|
104408
104666
|
host.resolveModuleNameLiterals ? (actualResolveModuleNamesWorker = host.resolveModuleNameLiterals.bind(host), moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host)) : host.resolveModuleNames ? (actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile, reusedNames) => host.resolveModuleNames(
|
|
104409
104667
|
moduleNames.map(getModuleResolutionName),
|
|
104410
104668
|
containingFile,
|
|
@@ -104606,7 +104864,7 @@ ${lanes.join(`
|
|
|
104606
104864
|
getTypeCount: () => getTypeChecker().getTypeCount(),
|
|
104607
104865
|
getInstantiationCount: () => getTypeChecker().getInstantiationCount(),
|
|
104608
104866
|
getRelationCacheSizes: () => getTypeChecker().getRelationCacheSizes(),
|
|
104609
|
-
getFileProcessingDiagnostics: () =>
|
|
104867
|
+
getFileProcessingDiagnostics: () => programDiagnostics.getFileProcessingDiagnostics(),
|
|
104610
104868
|
getAutomaticTypeDirectiveNames: () => automaticTypeDirectiveNames,
|
|
104611
104869
|
getAutomaticTypeDirectiveResolutions: () => automaticTypeDirectiveResolutions,
|
|
104612
104870
|
isSourceFileFromExternalLibrary,
|
|
@@ -104622,6 +104880,7 @@ ${lanes.join(`
|
|
|
104622
104880
|
resolvedModules,
|
|
104623
104881
|
resolvedTypeReferenceDirectiveNames,
|
|
104624
104882
|
resolvedLibReferences,
|
|
104883
|
+
getProgramDiagnosticsContainer: () => programDiagnostics,
|
|
104625
104884
|
getResolvedModule,
|
|
104626
104885
|
getResolvedModuleFromModuleSpecifier,
|
|
104627
104886
|
getResolvedTypeReferenceDirective,
|
|
@@ -104654,54 +104913,12 @@ ${lanes.join(`
|
|
|
104654
104913
|
realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),
|
|
104655
104914
|
useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(),
|
|
104656
104915
|
getCanonicalFileName,
|
|
104657
|
-
getFileIncludeReasons: () =>
|
|
104916
|
+
getFileIncludeReasons: () => programDiagnostics.getFileReasons(),
|
|
104658
104917
|
structureIsReused,
|
|
104659
104918
|
writeFile: writeFile2,
|
|
104660
104919
|
getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
|
|
104661
104920
|
};
|
|
104662
|
-
return onProgramCreateComplete(), verifyCompilerOptions(), mark("afterProgram"), measure("Program", "beforeProgram", "afterProgram"), (_p = tracing) == null || _p.pop(), program;
|
|
104663
|
-
function updateAndGetProgramDiagnostics() {
|
|
104664
|
-
return lazyProgramDiagnosticExplainingFile && (fileProcessingDiagnostics?.forEach((diagnostic) => {
|
|
104665
|
-
switch (diagnostic.kind) {
|
|
104666
|
-
case 1:
|
|
104667
|
-
return programDiagnostics.add(
|
|
104668
|
-
createDiagnosticExplainingFile(
|
|
104669
|
-
diagnostic.file && getSourceFileByPath(diagnostic.file),
|
|
104670
|
-
diagnostic.fileProcessingReason,
|
|
104671
|
-
diagnostic.diagnostic,
|
|
104672
|
-
diagnostic.args || emptyArray
|
|
104673
|
-
)
|
|
104674
|
-
);
|
|
104675
|
-
case 0:
|
|
104676
|
-
return programDiagnostics.add(filePreprocessingLibreferenceDiagnostic(diagnostic));
|
|
104677
|
-
case 2:
|
|
104678
|
-
return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d));
|
|
104679
|
-
default:
|
|
104680
|
-
Debug.assertNever(diagnostic);
|
|
104681
|
-
}
|
|
104682
|
-
}), lazyProgramDiagnosticExplainingFile.forEach(
|
|
104683
|
-
({ file, diagnostic, args }) => programDiagnostics.add(
|
|
104684
|
-
createDiagnosticExplainingFile(
|
|
104685
|
-
file,
|
|
104686
|
-
/*fileProcessingReason*/
|
|
104687
|
-
void 0,
|
|
104688
|
-
diagnostic,
|
|
104689
|
-
args
|
|
104690
|
-
)
|
|
104691
|
-
)
|
|
104692
|
-
), lazyProgramDiagnosticExplainingFile = void 0, fileReasonsToChain = void 0, reasonToRelatedInfo = void 0), programDiagnostics;
|
|
104693
|
-
}
|
|
104694
|
-
function filePreprocessingLibreferenceDiagnostic({ reason }) {
|
|
104695
|
-
let { file, pos, end } = getReferencedFileLocation(program, reason), libReference = file.libReferenceDirectives[reason.index], libName = getLibNameFromLibReference(libReference), unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts"), suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
|
|
104696
|
-
return createFileDiagnostic(
|
|
104697
|
-
file,
|
|
104698
|
-
Debug.checkDefined(pos),
|
|
104699
|
-
Debug.checkDefined(end) - pos,
|
|
104700
|
-
suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0,
|
|
104701
|
-
libName,
|
|
104702
|
-
suggestion
|
|
104703
|
-
);
|
|
104704
|
-
}
|
|
104921
|
+
return onProgramCreateComplete(), skipVerifyCompilerOptions || verifyCompilerOptions(), mark("afterProgram"), measure("Program", "beforeProgram", "afterProgram"), (_p = tracing) == null || _p.pop(), program;
|
|
104705
104922
|
function getResolvedModule(file, moduleName, mode) {
|
|
104706
104923
|
var _a2;
|
|
104707
104924
|
return (_a2 = resolvedModules?.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode);
|
|
@@ -104743,7 +104960,7 @@ ${lanes.join(`
|
|
|
104743
104960
|
}
|
|
104744
104961
|
function addResolutionDiagnostics(resolution) {
|
|
104745
104962
|
var _a2;
|
|
104746
|
-
(_a2 = resolution.resolutionDiagnostics) != null && _a2.length &&
|
|
104963
|
+
(_a2 = resolution.resolutionDiagnostics) != null && _a2.length && programDiagnostics.addFileProcessingDiagnostic({
|
|
104747
104964
|
kind: 2,
|
|
104748
104965
|
diagnostics: resolution.resolutionDiagnostics
|
|
104749
104966
|
});
|
|
@@ -104822,17 +105039,17 @@ ${lanes.join(`
|
|
|
104822
105039
|
return toPath(fileName, currentDirectory, getCanonicalFileName);
|
|
104823
105040
|
}
|
|
104824
105041
|
function getCommonSourceDirectory2() {
|
|
104825
|
-
|
|
104826
|
-
|
|
104827
|
-
commonSourceDirectory
|
|
104828
|
-
|
|
104829
|
-
|
|
104830
|
-
|
|
104831
|
-
|
|
104832
|
-
|
|
104833
|
-
|
|
104834
|
-
|
|
104835
|
-
|
|
105042
|
+
let commonSourceDirectory = programDiagnostics.getCommonSourceDirectory();
|
|
105043
|
+
if (commonSourceDirectory !== void 0)
|
|
105044
|
+
return commonSourceDirectory;
|
|
105045
|
+
let emittedFiles = filter(files, (file) => sourceFileMayBeEmitted(file, program));
|
|
105046
|
+
return commonSourceDirectory = getCommonSourceDirectory(
|
|
105047
|
+
options,
|
|
105048
|
+
() => mapDefined(emittedFiles, (file) => file.isDeclarationFile ? void 0 : file.fileName),
|
|
105049
|
+
currentDirectory,
|
|
105050
|
+
getCanonicalFileName,
|
|
105051
|
+
(commonSourceDirectory2) => checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory2)
|
|
105052
|
+
), programDiagnostics.setCommonSourceDirectory(commonSourceDirectory), commonSourceDirectory;
|
|
104836
105053
|
}
|
|
104837
105054
|
function getClassifiableNames() {
|
|
104838
105055
|
var _a2;
|
|
@@ -105035,7 +105252,7 @@ ${lanes.join(`
|
|
|
105035
105252
|
missingFileNames = oldProgram.getMissingFilePaths(), Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length);
|
|
105036
105253
|
for (let newSourceFile of newSourceFiles)
|
|
105037
105254
|
filesByName.set(newSourceFile.path, newSourceFile);
|
|
105038
|
-
|
|
105255
|
+
oldProgram.getFilesByNameMap().forEach((oldFile, path) => {
|
|
105039
105256
|
if (!oldFile) {
|
|
105040
105257
|
filesByName.set(path, oldFile);
|
|
105041
105258
|
return;
|
|
@@ -105045,7 +105262,9 @@ ${lanes.join(`
|
|
|
105045
105262
|
return;
|
|
105046
105263
|
}
|
|
105047
105264
|
filesByName.set(path, filesByName.get(oldFile.path));
|
|
105048
|
-
})
|
|
105265
|
+
});
|
|
105266
|
+
let isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
|
|
105267
|
+
return programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical), skipVerifyCompilerOptions = isConfigIdentical, files = newSourceFiles, automaticTypeDirectiveNames = oldProgram.getAutomaticTypeDirectiveNames(), automaticTypeDirectiveResolutions = oldProgram.getAutomaticTypeDirectiveResolutions(), sourceFileToPackageName = oldProgram.sourceFileToPackageName, redirectTargetsMap = oldProgram.redirectTargetsMap, usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules, resolvedModules = oldProgram.resolvedModules, resolvedTypeReferenceDirectiveNames = oldProgram.resolvedTypeReferenceDirectiveNames, resolvedLibReferences = oldProgram.resolvedLibReferences, packageMap = oldProgram.getCurrentPackagesMap(), 2;
|
|
105049
105268
|
}
|
|
105050
105269
|
function getEmitHost(writeFileCallback) {
|
|
105051
105270
|
return {
|
|
@@ -105225,7 +105444,7 @@ ${lanes.join(`
|
|
|
105225
105444
|
var _a2;
|
|
105226
105445
|
if (skipTypeChecking(sourceFile, options, program))
|
|
105227
105446
|
return emptyArray;
|
|
105228
|
-
let programDiagnosticsInFile =
|
|
105447
|
+
let programDiagnosticsInFile = programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(sourceFile.fileName);
|
|
105229
105448
|
return (_a2 = sourceFile.commentDirectives) != null && _a2.length ? getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, programDiagnosticsInFile).diagnostics : programDiagnosticsInFile;
|
|
105230
105449
|
}
|
|
105231
105450
|
function getDeclarationDiagnostics2(sourceFile, cancellationToken) {
|
|
@@ -105513,15 +105732,15 @@ ${lanes.join(`
|
|
|
105513
105732
|
}
|
|
105514
105733
|
function getOptionsDiagnostics() {
|
|
105515
105734
|
return sortAndDeduplicateDiagnostics(concatenate(
|
|
105516
|
-
|
|
105735
|
+
programDiagnostics.getCombinedDiagnostics(program).getGlobalDiagnostics(),
|
|
105517
105736
|
getOptionsDiagnosticsOfConfigFile()
|
|
105518
105737
|
));
|
|
105519
105738
|
}
|
|
105520
105739
|
function getOptionsDiagnosticsOfConfigFile() {
|
|
105521
105740
|
if (!options.configFile) return emptyArray;
|
|
105522
|
-
let diagnostics =
|
|
105741
|
+
let diagnostics = programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(options.configFile.fileName);
|
|
105523
105742
|
return forEachResolvedProjectReference2((resolvedRef) => {
|
|
105524
|
-
diagnostics = concatenate(diagnostics,
|
|
105743
|
+
diagnostics = concatenate(diagnostics, programDiagnostics.getCombinedDiagnostics(program).getDiagnostics(resolvedRef.sourceFile.fileName));
|
|
105525
105744
|
}), diagnostics;
|
|
105526
105745
|
}
|
|
105527
105746
|
function getGlobalDiagnostics() {
|
|
@@ -105684,7 +105903,7 @@ ${lanes.join(`
|
|
|
105684
105903
|
);
|
|
105685
105904
|
}
|
|
105686
105905
|
function reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason) {
|
|
105687
|
-
!isReferencedFile(reason) && some(
|
|
105906
|
+
!isReferencedFile(reason) && some(programDiagnostics.getFileReasons().get(existingFile.path), isReferencedFile) ? addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName, fileName]) : addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
|
|
105688
105907
|
}
|
|
105689
105908
|
function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path, resolvedPath, originalFileName, sourceFileOptions) {
|
|
105690
105909
|
var _a2;
|
|
@@ -105790,7 +106009,7 @@ ${lanes.join(`
|
|
|
105790
106009
|
return file;
|
|
105791
106010
|
}
|
|
105792
106011
|
function addFileIncludeReason(file, reason, checkExisting) {
|
|
105793
|
-
return file && (!checkExisting || !isReferencedFile(reason) || !filesWithReferencesProcessed?.has(reason.file)) ? (
|
|
106012
|
+
return file && (!checkExisting || !isReferencedFile(reason) || !filesWithReferencesProcessed?.has(reason.file)) ? (programDiagnostics.getFileReasons().add(file.path, reason), !0) : !1;
|
|
105794
106013
|
}
|
|
105795
106014
|
function addFileToFilesByName(file, path, fileName, redirectedPath) {
|
|
105796
106015
|
redirectedPath ? (updateFilesByNameMap(fileName, redirectedPath, file), updateFilesByNameMap(fileName, path, file || !1)) : updateFilesByNameMap(fileName, path, file);
|
|
@@ -105921,6 +106140,15 @@ ${lanes.join(`
|
|
|
105921
106140
|
var _a2, _b2, _c2, _d2, _e2;
|
|
105922
106141
|
let existing = resolvedLibProcessing?.get(libFileName);
|
|
105923
106142
|
if (existing) return existing;
|
|
106143
|
+
if (options.libReplacement === !1) {
|
|
106144
|
+
let result2 = {
|
|
106145
|
+
resolution: {
|
|
106146
|
+
resolvedModule: void 0
|
|
106147
|
+
},
|
|
106148
|
+
actual: combinePaths(defaultLibraryPath, libFileName)
|
|
106149
|
+
};
|
|
106150
|
+
return (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, result2), result2;
|
|
106151
|
+
}
|
|
105924
106152
|
if (structureIsReused !== 0 && oldProgram && !hasInvalidatedLibResolutions(libFileName)) {
|
|
105925
106153
|
let oldResolution = (_a2 = oldProgram.resolvedLibReferences) == null ? void 0 : _a2.get(libFileName);
|
|
105926
106154
|
if (oldResolution) {
|
|
@@ -105958,7 +106186,7 @@ ${lanes.join(`
|
|
|
105958
106186
|
/*ignoreNoDefaultLib*/
|
|
105959
106187
|
!0,
|
|
105960
106188
|
{ kind: 7, file: file.path, index }
|
|
105961
|
-
) :
|
|
106189
|
+
) : programDiagnostics.addFileProcessingDiagnostic({
|
|
105962
106190
|
kind: 0,
|
|
105963
106191
|
reason: { kind: 7, file: file.path, index }
|
|
105964
106192
|
});
|
|
@@ -105995,10 +106223,11 @@ ${lanes.join(`
|
|
|
105995
106223
|
function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) {
|
|
105996
106224
|
let allFilesBelongToPath = !0, absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory));
|
|
105997
106225
|
for (let sourceFile of sourceFiles)
|
|
105998
|
-
sourceFile.isDeclarationFile || host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)).indexOf(absoluteRootDirectoryPath) !== 0 && (
|
|
106226
|
+
sourceFile.isDeclarationFile || host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)).indexOf(absoluteRootDirectoryPath) !== 0 && (programDiagnostics.addLazyConfigDiagnostic(
|
|
105999
106227
|
sourceFile,
|
|
106000
106228
|
Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,
|
|
106001
|
-
|
|
106229
|
+
sourceFile.fileName,
|
|
106230
|
+
rootDirectory
|
|
106002
106231
|
), allFilesBelongToPath = !1);
|
|
106003
106232
|
return allFilesBelongToPath;
|
|
106004
106233
|
}
|
|
@@ -106059,13 +106288,14 @@ ${lanes.join(`
|
|
|
106059
106288
|
function verifyCompilerOptions() {
|
|
106060
106289
|
options.strictPropertyInitialization && !getStrictOptionValue(options, "strictNullChecks") && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks"), options.exactOptionalPropertyTypes && !getStrictOptionValue(options, "strictNullChecks") && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks"), (options.isolatedModules || options.verbatimModuleSyntax) && options.outFile && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "outFile", options.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"), options.isolatedDeclarations && (getAllowJSCompilerOption(options) && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", "isolatedDeclarations"), getEmitDeclarations(options) || createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "isolatedDeclarations", "declaration", "composite")), options.inlineSourceMap && (options.sourceMap && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap"), options.mapRoot && createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap")), options.composite && (options.declaration === !1 && createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration"), options.incremental === !1 && createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_incremental_compilation, "declaration"));
|
|
106061
106290
|
let outputFile = options.outFile;
|
|
106062
|
-
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath && programDiagnostics.
|
|
106291
|
+
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath && programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)), verifyDeprecatedCompilerOptions(), verifyProjectReferences(), options.composite) {
|
|
106063
106292
|
let rootPaths = new Set(rootNames.map(toPath3));
|
|
106064
106293
|
for (let file of files)
|
|
106065
|
-
sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path) &&
|
|
106294
|
+
sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path) && programDiagnostics.addLazyConfigDiagnostic(
|
|
106066
106295
|
file,
|
|
106067
106296
|
Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern,
|
|
106068
|
-
|
|
106297
|
+
file.fileName,
|
|
106298
|
+
options.configFilePath || ""
|
|
106069
106299
|
);
|
|
106070
106300
|
}
|
|
106071
106301
|
if (options.paths) {
|
|
@@ -106105,14 +106335,14 @@ ${lanes.join(`
|
|
|
106105
106335
|
options.module === 0 && languageVersion < 2 && options.isolatedModules && createDiagnosticForOptionName(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target"), options.preserveConstEnums === !1 && createDiagnosticForOptionName(Diagnostics.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, options.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", "preserveConstEnums");
|
|
106106
106336
|
else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 && options.module === 0) {
|
|
106107
106337
|
let span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator == "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
106108
|
-
programDiagnostics.
|
|
106338
|
+
programDiagnostics.addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none));
|
|
106109
106339
|
}
|
|
106110
106340
|
if (outputFile && !options.emitDeclarationOnly) {
|
|
106111
106341
|
if (options.module && !(options.module === 2 || options.module === 4))
|
|
106112
106342
|
createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module");
|
|
106113
106343
|
else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) {
|
|
106114
106344
|
let span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator == "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator);
|
|
106115
|
-
programDiagnostics.
|
|
106345
|
+
programDiagnostics.addConfigDiagnostic(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile"));
|
|
106116
106346
|
}
|
|
106117
106347
|
}
|
|
106118
106348
|
if (getResolveJsonModule(options) && (getEmitModuleResolutionKind(options) === 1 ? createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule") : hasJsonModuleEmitEnabled(options) || createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd, "resolveJsonModule", "module")), options.outDir || // there is --outDir specified
|
|
@@ -106128,8 +106358,8 @@ ${lanes.join(`
|
|
|
106128
106358
|
options.verbatimModuleSyntax && (moduleKind === 2 || moduleKind === 3 || moduleKind === 4) && createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"), options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly || options.rewriteRelativeImportExtensions) && createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set);
|
|
106129
106359
|
let moduleResolution = getEmitModuleResolutionKind(options);
|
|
106130
106360
|
if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) && createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports"), options.resolvePackageJsonImports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) && createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports"), options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) && createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions"), moduleResolution === 100 && !emitModuleKindIsNonNodeESM(moduleKind) && moduleKind !== 200 && createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler"), ModuleKind[moduleKind] && 100 <= moduleKind && moduleKind <= 199 && !(3 <= moduleResolution && moduleResolution <= 99)) {
|
|
106131
|
-
let moduleKindName = ModuleKind[moduleKind];
|
|
106132
|
-
createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1,
|
|
106361
|
+
let moduleKindName = ModuleKind[moduleKind], moduleResolutionName = ModuleResolutionKind[moduleKindName] ? moduleKindName : "Node16";
|
|
106362
|
+
createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleResolutionName, moduleKindName);
|
|
106133
106363
|
} else if (ModuleResolutionKind[moduleResolution] && 3 <= moduleResolution && moduleResolution <= 99 && !(100 <= moduleKind && moduleKind <= 199)) {
|
|
106134
106364
|
let moduleResolutionName = ModuleResolutionKind[moduleResolution];
|
|
106135
106365
|
createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName);
|
|
@@ -106226,30 +106456,8 @@ ${lanes.join(`
|
|
|
106226
106456
|
ref.prepend && createDeprecatedDiagnostic("prepend");
|
|
106227
106457
|
});
|
|
106228
106458
|
}
|
|
106229
|
-
function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
|
|
106230
|
-
let seenReasons, reasons = file && fileReasons.get(file.path), fileIncludeReasons, relatedInfo, locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0, fileIncludeReasonDetails, redirectInfo, cachedChain = file && fileReasonsToChain?.get(file.path), chain;
|
|
106231
|
-
cachedChain ? (cachedChain.fileIncludeReasonDetails ? (seenReasons = new Set(reasons), reasons?.forEach(populateRelatedInfo)) : reasons?.forEach(processReason), redirectInfo = cachedChain.redirectInfo) : (reasons?.forEach(processReason), redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, getCompilerOptionsForFile(file))), fileProcessingReason && processReason(fileProcessingReason);
|
|
106232
|
-
let processedExtraReason = seenReasons?.size !== reasons?.length;
|
|
106233
|
-
locationReason && seenReasons?.size === 1 && (seenReasons = void 0), seenReasons && cachedChain && (cachedChain.details && !processedExtraReason ? chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args || emptyArray) : cachedChain.fileIncludeReasonDetails && (processedExtraReason ? cachedFileIncludeDetailsHasProcessedExtraReason() ? fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]) : fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]] : cachedFileIncludeDetailsHasProcessedExtraReason() ? fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length) : fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails)), chain || (fileIncludeReasonDetails || (fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon)), chain = chainDiagnosticMessages(
|
|
106234
|
-
redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails,
|
|
106235
|
-
diagnostic,
|
|
106236
|
-
...args || emptyArray
|
|
106237
|
-
)), file && (cachedChain ? (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) && (cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails) : (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo }), !cachedChain.details && !processedExtraReason && (cachedChain.details = chain.next));
|
|
106238
|
-
let location = locationReason && getReferencedFileLocation(program, locationReason);
|
|
106239
|
-
return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo);
|
|
106240
|
-
function processReason(reason) {
|
|
106241
|
-
seenReasons?.has(reason) || ((seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason), (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason)), populateRelatedInfo(reason));
|
|
106242
|
-
}
|
|
106243
|
-
function populateRelatedInfo(reason) {
|
|
106244
|
-
!locationReason && isReferencedFile(reason) ? locationReason = reason : locationReason !== reason && (relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(reason)));
|
|
106245
|
-
}
|
|
106246
|
-
function cachedFileIncludeDetailsHasProcessedExtraReason() {
|
|
106247
|
-
var _a2;
|
|
106248
|
-
return ((_a2 = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a2.length) !== reasons?.length;
|
|
106249
|
-
}
|
|
106250
|
-
}
|
|
106251
106459
|
function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) {
|
|
106252
|
-
|
|
106460
|
+
programDiagnostics.addFileProcessingDiagnostic({
|
|
106253
106461
|
kind: 1,
|
|
106254
106462
|
file: file && file.path,
|
|
106255
106463
|
fileProcessingReason,
|
|
@@ -106257,88 +106465,6 @@ ${lanes.join(`
|
|
|
106257
106465
|
args
|
|
106258
106466
|
});
|
|
106259
106467
|
}
|
|
106260
|
-
function addLazyProgramDiagnosticExplainingFile(file, diagnostic, args) {
|
|
106261
|
-
lazyProgramDiagnosticExplainingFile.push({ file, diagnostic, args });
|
|
106262
|
-
}
|
|
106263
|
-
function getFileIncludeReasonToRelatedInformation(reason) {
|
|
106264
|
-
let relatedInfo = reasonToRelatedInfo?.get(reason);
|
|
106265
|
-
return relatedInfo === void 0 && (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(reason) ?? !1), relatedInfo || void 0;
|
|
106266
|
-
}
|
|
106267
|
-
function fileIncludeReasonToRelatedInformation(reason) {
|
|
106268
|
-
if (isReferencedFile(reason)) {
|
|
106269
|
-
let referenceLocation = getReferencedFileLocation(program, reason), message2;
|
|
106270
|
-
switch (reason.kind) {
|
|
106271
|
-
case 3:
|
|
106272
|
-
message2 = Diagnostics.File_is_included_via_import_here;
|
|
106273
|
-
break;
|
|
106274
|
-
case 4:
|
|
106275
|
-
message2 = Diagnostics.File_is_included_via_reference_here;
|
|
106276
|
-
break;
|
|
106277
|
-
case 5:
|
|
106278
|
-
message2 = Diagnostics.File_is_included_via_type_library_reference_here;
|
|
106279
|
-
break;
|
|
106280
|
-
case 7:
|
|
106281
|
-
message2 = Diagnostics.File_is_included_via_library_reference_here;
|
|
106282
|
-
break;
|
|
106283
|
-
default:
|
|
106284
|
-
Debug.assertNever(reason);
|
|
106285
|
-
}
|
|
106286
|
-
return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic(
|
|
106287
|
-
referenceLocation.file,
|
|
106288
|
-
referenceLocation.pos,
|
|
106289
|
-
referenceLocation.end - referenceLocation.pos,
|
|
106290
|
-
message2
|
|
106291
|
-
) : void 0;
|
|
106292
|
-
}
|
|
106293
|
-
if (!options.configFile) return;
|
|
106294
|
-
let configFileNode, message;
|
|
106295
|
-
switch (reason.kind) {
|
|
106296
|
-
case 0:
|
|
106297
|
-
if (!options.configFile.configFileSpecs) return;
|
|
106298
|
-
let fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory), matchedByFiles = getMatchedFileSpec(program, fileName);
|
|
106299
|
-
if (matchedByFiles) {
|
|
106300
|
-
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles), message = Diagnostics.File_is_matched_by_files_list_specified_here;
|
|
106301
|
-
break;
|
|
106302
|
-
}
|
|
106303
|
-
let matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
106304
|
-
if (!matchedByInclude || !isString(matchedByInclude)) return;
|
|
106305
|
-
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude), message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
106306
|
-
break;
|
|
106307
|
-
case 1:
|
|
106308
|
-
case 2:
|
|
106309
|
-
let referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences?.[reason.index]), referenceInfo = forEachProjectReference(
|
|
106310
|
-
projectReferences,
|
|
106311
|
-
resolvedProjectReferences,
|
|
106312
|
-
(resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: parent2?.sourceFile || options.configFile, index: index2 } : void 0
|
|
106313
|
-
);
|
|
106314
|
-
if (!referenceInfo) return;
|
|
106315
|
-
let { sourceFile, index } = referenceInfo, referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
106316
|
-
return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
|
|
106317
|
-
sourceFile,
|
|
106318
|
-
referencesSyntax.elements[index],
|
|
106319
|
-
reason.kind === 2 ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
|
|
106320
|
-
) : void 0;
|
|
106321
|
-
case 8:
|
|
106322
|
-
if (!options.types) return;
|
|
106323
|
-
configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference), message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
|
|
106324
|
-
break;
|
|
106325
|
-
case 6:
|
|
106326
|
-
if (reason.index !== void 0) {
|
|
106327
|
-
configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]), message = Diagnostics.File_is_library_specified_here;
|
|
106328
|
-
break;
|
|
106329
|
-
}
|
|
106330
|
-
let target = getNameOfScriptTarget(getEmitScriptTarget(options));
|
|
106331
|
-
configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0, message = Diagnostics.File_is_default_library_for_target_specified_here;
|
|
106332
|
-
break;
|
|
106333
|
-
default:
|
|
106334
|
-
Debug.assertNever(reason);
|
|
106335
|
-
}
|
|
106336
|
-
return configFileNode && createDiagnosticForNodeInSourceFile(
|
|
106337
|
-
options.configFile,
|
|
106338
|
-
configFileNode,
|
|
106339
|
-
message
|
|
106340
|
-
);
|
|
106341
|
-
}
|
|
106342
106468
|
function verifyProjectReferences() {
|
|
106343
106469
|
let buildInfoPath = options.suppressOutputPathCheck ? void 0 : getTsBuildInfoEmitOutputFilePath(options);
|
|
106344
106470
|
forEachProjectReference(
|
|
@@ -106360,7 +106486,7 @@ ${lanes.join(`
|
|
|
106360
106486
|
forEachOptionPathsSyntax((pathProp) => {
|
|
106361
106487
|
isObjectLiteralExpression(pathProp.initializer) && forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => {
|
|
106362
106488
|
let initializer = keyProps.initializer;
|
|
106363
|
-
isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex && (programDiagnostics.
|
|
106489
|
+
isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex && (programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args)), needCompilerDiagnostic = !1);
|
|
106364
106490
|
});
|
|
106365
106491
|
}), needCompilerDiagnostic && createCompilerOptionsDiagnostic(message, ...args);
|
|
106366
106492
|
}
|
|
@@ -106378,18 +106504,8 @@ ${lanes.join(`
|
|
|
106378
106504
|
) && (needCompilerDiagnostic = !1);
|
|
106379
106505
|
}), needCompilerDiagnostic && createCompilerOptionsDiagnostic(message, ...args);
|
|
106380
106506
|
}
|
|
106381
|
-
function forEachOptionsSyntaxByName(name, callback) {
|
|
106382
|
-
return forEachPropertyAssignment(getCompilerOptionsObjectLiteralSyntax(), name, callback);
|
|
106383
|
-
}
|
|
106384
106507
|
function forEachOptionPathsSyntax(callback) {
|
|
106385
|
-
return forEachOptionsSyntaxByName("paths", callback);
|
|
106386
|
-
}
|
|
106387
|
-
function getOptionsSyntaxByValue(name, value) {
|
|
106388
|
-
return forEachOptionsSyntaxByName(name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0);
|
|
106389
|
-
}
|
|
106390
|
-
function getOptionsSyntaxByArrayElementValue(name, value) {
|
|
106391
|
-
let compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax();
|
|
106392
|
-
return compilerOptionsObjectLiteralSyntax && getPropertyArrayElementValue(compilerOptionsObjectLiteralSyntax, name, value);
|
|
106508
|
+
return forEachOptionsSyntaxByName(getCompilerOptionsObjectLiteralSyntax(), "paths", callback);
|
|
106393
106509
|
}
|
|
106394
106510
|
function createDiagnosticForOptionName(message, option1, option2, option3) {
|
|
106395
106511
|
createDiagnosticForOption(
|
|
@@ -106416,7 +106532,7 @@ ${lanes.join(`
|
|
|
106416
106532
|
}
|
|
106417
106533
|
function createDiagnosticForReference(sourceFile, index, message, ...args) {
|
|
106418
106534
|
let referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
106419
|
-
referencesSyntax && referencesSyntax.elements.length > index ? programDiagnostics.
|
|
106535
|
+
referencesSyntax && referencesSyntax.elements.length > index ? programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)) : programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
|
|
106420
106536
|
}
|
|
106421
106537
|
function createDiagnosticForOption(onKey, option1, option2, message, ...args) {
|
|
106422
106538
|
let compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax();
|
|
@@ -106424,7 +106540,7 @@ ${lanes.join(`
|
|
|
106424
106540
|
}
|
|
106425
106541
|
function createCompilerOptionsDiagnostic(message, ...args) {
|
|
106426
106542
|
let compilerOptionsProperty = getCompilerOptionsPropertySyntax();
|
|
106427
|
-
compilerOptionsProperty ? "messageText" in message ? programDiagnostics.
|
|
106543
|
+
compilerOptionsProperty ? "messageText" in message ? programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, compilerOptionsProperty.name, message)) : programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, compilerOptionsProperty.name, message, ...args)) : "messageText" in message ? programDiagnostics.addConfigDiagnostic(createCompilerDiagnosticFromMessageChain(message)) : programDiagnostics.addConfigDiagnostic(createCompilerDiagnostic(message, ...args));
|
|
106428
106544
|
}
|
|
106429
106545
|
function getCompilerOptionsObjectLiteralSyntax() {
|
|
106430
106546
|
if (_compilerOptionsObjectLiteralSyntax === void 0) {
|
|
@@ -106443,11 +106559,11 @@ ${lanes.join(`
|
|
|
106443
106559
|
function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, ...args) {
|
|
106444
106560
|
let needsCompilerDiagnostic = !1;
|
|
106445
106561
|
return forEachPropertyAssignment(objectLiteral, key1, (prop) => {
|
|
106446
|
-
"messageText" in message ? programDiagnostics.
|
|
106562
|
+
"messageText" in message ? programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)) : programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args)), needsCompilerDiagnostic = !0;
|
|
106447
106563
|
}, key2), needsCompilerDiagnostic;
|
|
106448
106564
|
}
|
|
106449
106565
|
function blockEmittingOfFile(emitFileName, diag2) {
|
|
106450
|
-
hasEmitBlockingDiagnostics.set(toPath3(emitFileName), !0), programDiagnostics.
|
|
106566
|
+
hasEmitBlockingDiagnostics.set(toPath3(emitFileName), !0), programDiagnostics.addConfigDiagnostic(diag2);
|
|
106451
106567
|
}
|
|
106452
106568
|
function isEmittedFile(file) {
|
|
106453
106569
|
if (options.noEmit)
|
|
@@ -106717,6 +106833,187 @@ ${lanes.join(`
|
|
|
106717
106833
|
}
|
|
106718
106834
|
Debug.fail("should never ask for module name at index higher than possible module name");
|
|
106719
106835
|
}
|
|
106836
|
+
function createProgramDiagnostics(getCompilerOptionsObjectLiteralSyntax) {
|
|
106837
|
+
let computedDiagnostics, fileReasons = createMultiMap(), fileProcessingDiagnostics, commonSourceDirectory, configDiagnostics, lazyConfigDiagnostics, fileReasonsToChain, reasonToRelatedInfo;
|
|
106838
|
+
return {
|
|
106839
|
+
addConfigDiagnostic(diag2) {
|
|
106840
|
+
Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"), (configDiagnostics ?? (configDiagnostics = createDiagnosticCollection())).add(diag2);
|
|
106841
|
+
},
|
|
106842
|
+
addLazyConfigDiagnostic(file, message, ...args) {
|
|
106843
|
+
Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"), (lazyConfigDiagnostics ?? (lazyConfigDiagnostics = [])).push({ file, diagnostic: message, args });
|
|
106844
|
+
},
|
|
106845
|
+
addFileProcessingDiagnostic(diag2) {
|
|
106846
|
+
Debug.assert(computedDiagnostics === void 0, "Cannot modify program diagnostic state after requesting combined diagnostics"), (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push(diag2);
|
|
106847
|
+
},
|
|
106848
|
+
setCommonSourceDirectory(directory) {
|
|
106849
|
+
commonSourceDirectory = directory;
|
|
106850
|
+
},
|
|
106851
|
+
reuseStateFromOldProgram(oldProgramDiagnostics, isConfigIdentical) {
|
|
106852
|
+
fileReasons = oldProgramDiagnostics.getFileReasons(), fileProcessingDiagnostics = oldProgramDiagnostics.getFileProcessingDiagnostics(), isConfigIdentical && (commonSourceDirectory = oldProgramDiagnostics.getCommonSourceDirectory(), configDiagnostics = oldProgramDiagnostics.getConfigDiagnostics(), lazyConfigDiagnostics = oldProgramDiagnostics.getLazyConfigDiagnostics());
|
|
106853
|
+
},
|
|
106854
|
+
getFileProcessingDiagnostics() {
|
|
106855
|
+
return fileProcessingDiagnostics;
|
|
106856
|
+
},
|
|
106857
|
+
getFileReasons() {
|
|
106858
|
+
return fileReasons;
|
|
106859
|
+
},
|
|
106860
|
+
getCommonSourceDirectory() {
|
|
106861
|
+
return commonSourceDirectory;
|
|
106862
|
+
},
|
|
106863
|
+
getConfigDiagnostics() {
|
|
106864
|
+
return configDiagnostics;
|
|
106865
|
+
},
|
|
106866
|
+
getLazyConfigDiagnostics() {
|
|
106867
|
+
return lazyConfigDiagnostics;
|
|
106868
|
+
},
|
|
106869
|
+
getCombinedDiagnostics(program) {
|
|
106870
|
+
return computedDiagnostics || (computedDiagnostics = createDiagnosticCollection(), configDiagnostics?.getDiagnostics().forEach((d) => computedDiagnostics.add(d)), fileProcessingDiagnostics?.forEach((diagnostic) => {
|
|
106871
|
+
switch (diagnostic.kind) {
|
|
106872
|
+
case 1:
|
|
106873
|
+
return computedDiagnostics.add(
|
|
106874
|
+
createDiagnosticExplainingFile(
|
|
106875
|
+
program,
|
|
106876
|
+
diagnostic.file && program.getSourceFileByPath(diagnostic.file),
|
|
106877
|
+
diagnostic.fileProcessingReason,
|
|
106878
|
+
diagnostic.diagnostic,
|
|
106879
|
+
diagnostic.args || emptyArray
|
|
106880
|
+
)
|
|
106881
|
+
);
|
|
106882
|
+
case 0:
|
|
106883
|
+
return computedDiagnostics.add(filePreprocessingLibreferenceDiagnostic(program, diagnostic));
|
|
106884
|
+
case 2:
|
|
106885
|
+
return diagnostic.diagnostics.forEach((d) => computedDiagnostics.add(d));
|
|
106886
|
+
default:
|
|
106887
|
+
Debug.assertNever(diagnostic);
|
|
106888
|
+
}
|
|
106889
|
+
}), lazyConfigDiagnostics?.forEach(
|
|
106890
|
+
({ file, diagnostic, args }) => computedDiagnostics.add(
|
|
106891
|
+
createDiagnosticExplainingFile(
|
|
106892
|
+
program,
|
|
106893
|
+
file,
|
|
106894
|
+
/*fileProcessingReason*/
|
|
106895
|
+
void 0,
|
|
106896
|
+
diagnostic,
|
|
106897
|
+
args
|
|
106898
|
+
)
|
|
106899
|
+
)
|
|
106900
|
+
), fileReasonsToChain = void 0, reasonToRelatedInfo = void 0, computedDiagnostics);
|
|
106901
|
+
}
|
|
106902
|
+
};
|
|
106903
|
+
function filePreprocessingLibreferenceDiagnostic(program, { reason }) {
|
|
106904
|
+
let { file, pos, end } = getReferencedFileLocation(program, reason), libReference = file.libReferenceDirectives[reason.index], libName = getLibNameFromLibReference(libReference), unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts"), suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity);
|
|
106905
|
+
return createFileDiagnostic(
|
|
106906
|
+
file,
|
|
106907
|
+
Debug.checkDefined(pos),
|
|
106908
|
+
Debug.checkDefined(end) - pos,
|
|
106909
|
+
suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0,
|
|
106910
|
+
libName,
|
|
106911
|
+
suggestion
|
|
106912
|
+
);
|
|
106913
|
+
}
|
|
106914
|
+
function createDiagnosticExplainingFile(program, file, fileProcessingReason, diagnostic, args) {
|
|
106915
|
+
let seenReasons, fileIncludeReasons, relatedInfo, fileIncludeReasonDetails, redirectInfo, chain, reasons = file && fileReasons.get(file.path), locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0, cachedChain = file && fileReasonsToChain?.get(file.path);
|
|
106916
|
+
cachedChain ? (cachedChain.fileIncludeReasonDetails ? (seenReasons = new Set(reasons), reasons?.forEach(populateRelatedInfo)) : reasons?.forEach(processReason), redirectInfo = cachedChain.redirectInfo) : (reasons?.forEach(processReason), redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, program.getCompilerOptionsForFile(file))), fileProcessingReason && processReason(fileProcessingReason);
|
|
106917
|
+
let processedExtraReason = seenReasons?.size !== reasons?.length;
|
|
106918
|
+
locationReason && seenReasons?.size === 1 && (seenReasons = void 0), seenReasons && cachedChain && (cachedChain.details && !processedExtraReason ? chain = chainDiagnosticMessages(cachedChain.details, diagnostic, ...args ?? emptyArray) : cachedChain.fileIncludeReasonDetails && (processedExtraReason ? cachedFileIncludeDetailsHasProcessedExtraReason() ? fileIncludeReasons = append(cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length), fileIncludeReasons[0]) : fileIncludeReasons = [...cachedChain.fileIncludeReasonDetails.next, fileIncludeReasons[0]] : cachedFileIncludeDetailsHasProcessedExtraReason() ? fileIncludeReasons = cachedChain.fileIncludeReasonDetails.next.slice(0, reasons.length) : fileIncludeReasonDetails = cachedChain.fileIncludeReasonDetails)), chain || (fileIncludeReasonDetails || (fileIncludeReasonDetails = seenReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon)), chain = chainDiagnosticMessages(
|
|
106919
|
+
redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails,
|
|
106920
|
+
diagnostic,
|
|
106921
|
+
...args || emptyArray
|
|
106922
|
+
)), file && (cachedChain ? (!cachedChain.fileIncludeReasonDetails || !processedExtraReason && fileIncludeReasonDetails) && (cachedChain.fileIncludeReasonDetails = fileIncludeReasonDetails) : (fileReasonsToChain ?? (fileReasonsToChain = /* @__PURE__ */ new Map())).set(file.path, cachedChain = { fileIncludeReasonDetails, redirectInfo }), !cachedChain.details && !processedExtraReason && (cachedChain.details = chain.next));
|
|
106923
|
+
let location = locationReason && getReferencedFileLocation(program, locationReason);
|
|
106924
|
+
return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo);
|
|
106925
|
+
function processReason(reason) {
|
|
106926
|
+
seenReasons?.has(reason) || ((seenReasons ?? (seenReasons = /* @__PURE__ */ new Set())).add(reason), (fileIncludeReasons ?? (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason)), populateRelatedInfo(reason));
|
|
106927
|
+
}
|
|
106928
|
+
function populateRelatedInfo(reason) {
|
|
106929
|
+
!locationReason && isReferencedFile(reason) ? locationReason = reason : locationReason !== reason && (relatedInfo = append(relatedInfo, getFileIncludeReasonToRelatedInformation(program, reason)));
|
|
106930
|
+
}
|
|
106931
|
+
function cachedFileIncludeDetailsHasProcessedExtraReason() {
|
|
106932
|
+
var _a;
|
|
106933
|
+
return ((_a = cachedChain.fileIncludeReasonDetails.next) == null ? void 0 : _a.length) !== reasons?.length;
|
|
106934
|
+
}
|
|
106935
|
+
}
|
|
106936
|
+
function getFileIncludeReasonToRelatedInformation(program, reason) {
|
|
106937
|
+
let relatedInfo = reasonToRelatedInfo?.get(reason);
|
|
106938
|
+
return relatedInfo === void 0 && (reasonToRelatedInfo ?? (reasonToRelatedInfo = /* @__PURE__ */ new Map())).set(reason, relatedInfo = fileIncludeReasonToRelatedInformation(program, reason) ?? !1), relatedInfo || void 0;
|
|
106939
|
+
}
|
|
106940
|
+
function fileIncludeReasonToRelatedInformation(program, reason) {
|
|
106941
|
+
if (isReferencedFile(reason)) {
|
|
106942
|
+
let referenceLocation = getReferencedFileLocation(program, reason), message2;
|
|
106943
|
+
switch (reason.kind) {
|
|
106944
|
+
case 3:
|
|
106945
|
+
message2 = Diagnostics.File_is_included_via_import_here;
|
|
106946
|
+
break;
|
|
106947
|
+
case 4:
|
|
106948
|
+
message2 = Diagnostics.File_is_included_via_reference_here;
|
|
106949
|
+
break;
|
|
106950
|
+
case 5:
|
|
106951
|
+
message2 = Diagnostics.File_is_included_via_type_library_reference_here;
|
|
106952
|
+
break;
|
|
106953
|
+
case 7:
|
|
106954
|
+
message2 = Diagnostics.File_is_included_via_library_reference_here;
|
|
106955
|
+
break;
|
|
106956
|
+
default:
|
|
106957
|
+
Debug.assertNever(reason);
|
|
106958
|
+
}
|
|
106959
|
+
return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic(
|
|
106960
|
+
referenceLocation.file,
|
|
106961
|
+
referenceLocation.pos,
|
|
106962
|
+
referenceLocation.end - referenceLocation.pos,
|
|
106963
|
+
message2
|
|
106964
|
+
) : void 0;
|
|
106965
|
+
}
|
|
106966
|
+
let currentDirectory = program.getCurrentDirectory(), rootNames = program.getRootFileNames(), options = program.getCompilerOptions();
|
|
106967
|
+
if (!options.configFile) return;
|
|
106968
|
+
let configFileNode, message;
|
|
106969
|
+
switch (reason.kind) {
|
|
106970
|
+
case 0:
|
|
106971
|
+
if (!options.configFile.configFileSpecs) return;
|
|
106972
|
+
let fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory), matchedByFiles = getMatchedFileSpec(program, fileName);
|
|
106973
|
+
if (matchedByFiles) {
|
|
106974
|
+
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles), message = Diagnostics.File_is_matched_by_files_list_specified_here;
|
|
106975
|
+
break;
|
|
106976
|
+
}
|
|
106977
|
+
let matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
106978
|
+
if (!matchedByInclude || !isString(matchedByInclude)) return;
|
|
106979
|
+
configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude), message = Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
106980
|
+
break;
|
|
106981
|
+
case 1:
|
|
106982
|
+
case 2:
|
|
106983
|
+
let resolvedProjectReferences = program.getResolvedProjectReferences(), projectReferences = program.getProjectReferences(), referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences?.[reason.index]), referenceInfo = forEachProjectReference(
|
|
106984
|
+
projectReferences,
|
|
106985
|
+
resolvedProjectReferences,
|
|
106986
|
+
(resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: parent2?.sourceFile || options.configFile, index: index2 } : void 0
|
|
106987
|
+
);
|
|
106988
|
+
if (!referenceInfo) return;
|
|
106989
|
+
let { sourceFile, index } = referenceInfo, referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0);
|
|
106990
|
+
return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile(
|
|
106991
|
+
sourceFile,
|
|
106992
|
+
referencesSyntax.elements[index],
|
|
106993
|
+
reason.kind === 2 ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here
|
|
106994
|
+
) : void 0;
|
|
106995
|
+
case 8:
|
|
106996
|
+
if (!options.types) return;
|
|
106997
|
+
configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "types", reason.typeReference), message = Diagnostics.File_is_entry_point_of_type_library_specified_here;
|
|
106998
|
+
break;
|
|
106999
|
+
case 6:
|
|
107000
|
+
if (reason.index !== void 0) {
|
|
107001
|
+
configFileNode = getOptionsSyntaxByArrayElementValue(getCompilerOptionsObjectLiteralSyntax(), "lib", options.lib[reason.index]), message = Diagnostics.File_is_library_specified_here;
|
|
107002
|
+
break;
|
|
107003
|
+
}
|
|
107004
|
+
let target = getNameOfScriptTarget(getEmitScriptTarget(options));
|
|
107005
|
+
configFileNode = target ? getOptionsSyntaxByValue(getCompilerOptionsObjectLiteralSyntax(), "target", target) : void 0, message = Diagnostics.File_is_default_library_for_target_specified_here;
|
|
107006
|
+
break;
|
|
107007
|
+
default:
|
|
107008
|
+
Debug.assertNever(reason);
|
|
107009
|
+
}
|
|
107010
|
+
return configFileNode && createDiagnosticForNodeInSourceFile(
|
|
107011
|
+
options.configFile,
|
|
107012
|
+
configFileNode,
|
|
107013
|
+
message
|
|
107014
|
+
);
|
|
107015
|
+
}
|
|
107016
|
+
}
|
|
106720
107017
|
function getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) {
|
|
106721
107018
|
let outputFiles = [], { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);
|
|
106722
107019
|
return { outputFiles, emitSkipped, diagnostics };
|
|
@@ -107343,7 +107640,7 @@ ${lanes.join(`
|
|
|
107343
107640
|
let seenFileAndExportsOfFile = /* @__PURE__ */ new Set(), invalidateJsFiles = !!((_a = affectedFile.symbol) != null && _a.exports) && !!forEachEntry(
|
|
107344
107641
|
affectedFile.symbol.exports,
|
|
107345
107642
|
(exported) => {
|
|
107346
|
-
if (exported.flags & 128) return !0;
|
|
107643
|
+
if ((exported.flags & 128) !== 0) return !0;
|
|
107347
107644
|
let aliased = skipAlias(exported, state.program.getTypeChecker());
|
|
107348
107645
|
return aliased === exported ? !1 : (aliased.flags & 128) !== 0 && some(aliased.declarations, (d) => getSourceFileOfNode(d) === affectedFile);
|
|
107349
107646
|
}
|
|
@@ -112386,15 +112683,21 @@ ${lanes.join(`
|
|
|
112386
112683
|
let result = tryVisitTypeReference(node);
|
|
112387
112684
|
return result || (markError(), node);
|
|
112388
112685
|
}
|
|
112389
|
-
if (isLiteralImportTypeNode(node))
|
|
112390
|
-
|
|
112686
|
+
if (isLiteralImportTypeNode(node)) {
|
|
112687
|
+
if (((_a = node.attributes) == null ? void 0 : _a.token) === 132)
|
|
112688
|
+
return markError(), node;
|
|
112689
|
+
if (!resolver.canReuseTypeNode(context, node))
|
|
112690
|
+
return resolver.serializeExistingTypeNode(context, node);
|
|
112691
|
+
let specifier = rewriteModuleSpecifier2(node, node.argument.literal), literal = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier;
|
|
112692
|
+
return factory.updateImportTypeNode(
|
|
112391
112693
|
node,
|
|
112392
|
-
|
|
112694
|
+
literal === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal),
|
|
112393
112695
|
visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes),
|
|
112394
112696
|
visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName),
|
|
112395
112697
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
|
112396
112698
|
node.isTypeOf
|
|
112397
|
-
)
|
|
112699
|
+
);
|
|
112700
|
+
}
|
|
112398
112701
|
if (isNamedDeclaration(node) && node.name.kind === 167 && !resolver.hasLateBindableName(node)) {
|
|
112399
112702
|
if (!hasDynamicName(node))
|
|
112400
112703
|
return visitEachChild2(node, visitExistingNodeTreeSymbols);
|
|
@@ -112500,7 +112803,7 @@ ${lanes.join(`
|
|
|
112500
112803
|
}
|
|
112501
112804
|
function rewriteModuleSpecifier2(parent2, lit) {
|
|
112502
112805
|
let newName = resolver.getModuleSpecifierOverride(context, parent2, lit);
|
|
112503
|
-
return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) :
|
|
112806
|
+
return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit;
|
|
112504
112807
|
}
|
|
112505
112808
|
}
|
|
112506
112809
|
}
|
|
@@ -112636,12 +112939,7 @@ ${lanes.join(`
|
|
|
112636
112939
|
if (accessorType && !isTypePredicateNode(accessorType))
|
|
112637
112940
|
return withNewScope(context, node, () => serializeTypeAnnotationOfDeclaration(accessorType, context, node, symbol) ?? inferTypeOfDeclaration(node, symbol, context));
|
|
112638
112941
|
if (accessorDeclarations.getAccessor)
|
|
112639
|
-
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(
|
|
112640
|
-
accessorDeclarations.getAccessor,
|
|
112641
|
-
/*symbol*/
|
|
112642
|
-
void 0,
|
|
112643
|
-
context
|
|
112644
|
-
));
|
|
112942
|
+
return withNewScope(context, accessorDeclarations.getAccessor, () => createReturnFromSignature(accessorDeclarations.getAccessor, symbol, context));
|
|
112645
112943
|
}
|
|
112646
112944
|
function typeFromVariable(node, symbol, context) {
|
|
112647
112945
|
var _a;
|
|
@@ -112723,11 +113021,11 @@ ${lanes.join(`
|
|
|
112723
113021
|
/* AnyKeyword */
|
|
112724
113022
|
);
|
|
112725
113023
|
}
|
|
112726
|
-
function inferReturnTypeOfSignatureSignature(node, context, reportFallback) {
|
|
113024
|
+
function inferReturnTypeOfSignatureSignature(node, context, symbol, reportFallback) {
|
|
112727
113025
|
return reportFallback && context.tracker.reportInferenceFallback(node), context.noInferenceFallback === !0 ? factory.createKeywordTypeNode(
|
|
112728
113026
|
133
|
|
112729
113027
|
/* AnyKeyword */
|
|
112730
|
-
) : resolver.serializeReturnTypeForSignature(context, node) ?? factory.createKeywordTypeNode(
|
|
113028
|
+
) : resolver.serializeReturnTypeForSignature(context, node, symbol) ?? factory.createKeywordTypeNode(
|
|
112731
113029
|
133
|
|
112732
113030
|
/* AnyKeyword */
|
|
112733
113031
|
);
|
|
@@ -112827,13 +113125,19 @@ ${lanes.join(`
|
|
|
112827
113125
|
return failed;
|
|
112828
113126
|
}
|
|
112829
113127
|
function typeFromFunctionLikeExpression(fnNode, context) {
|
|
112830
|
-
let
|
|
112831
|
-
return context.noInferenceFallback = !0, createReturnFromSignature(
|
|
113128
|
+
let returnType = createReturnFromSignature(
|
|
112832
113129
|
fnNode,
|
|
112833
113130
|
/*symbol*/
|
|
112834
113131
|
void 0,
|
|
112835
113132
|
context
|
|
112836
|
-
), reuseTypeParameters(fnNode.typeParameters, context), fnNode.parameters.map((p) => ensureParameter(p, context))
|
|
113133
|
+
), typeParameters = reuseTypeParameters(fnNode.typeParameters, context), parameters = fnNode.parameters.map((p) => ensureParameter(p, context));
|
|
113134
|
+
return syntacticResult(
|
|
113135
|
+
factory.createFunctionTypeNode(
|
|
113136
|
+
typeParameters,
|
|
113137
|
+
parameters,
|
|
113138
|
+
returnType
|
|
113139
|
+
)
|
|
113140
|
+
);
|
|
112837
113141
|
}
|
|
112838
113142
|
function canGetTypeFromArrayLiteral(arrayLiteral, context, isConstContext) {
|
|
112839
113143
|
if (!isConstContext)
|
|
@@ -112974,18 +113278,17 @@ ${lanes.join(`
|
|
|
112974
113278
|
);
|
|
112975
113279
|
}
|
|
112976
113280
|
function reuseTypeParameters(typeParameters, context) {
|
|
112977
|
-
return typeParameters?.map(
|
|
112978
|
-
|
|
112979
|
-
|
|
112980
|
-
|
|
112981
|
-
|
|
112982
|
-
|
|
112983
|
-
|
|
112984
|
-
|
|
112985
|
-
|
|
112986
|
-
|
|
112987
|
-
|
|
112988
|
-
);
|
|
113281
|
+
return typeParameters?.map((tp) => {
|
|
113282
|
+
var _a;
|
|
113283
|
+
let { node: tpName } = resolver.trackExistingEntityName(context, tp.name);
|
|
113284
|
+
return factory.updateTypeParameterDeclaration(
|
|
113285
|
+
tp,
|
|
113286
|
+
(_a = tp.modifiers) == null ? void 0 : _a.map((m) => reuseNode(context, m)),
|
|
113287
|
+
tpName,
|
|
113288
|
+
serializeExistingTypeNodeWithFallback(tp.constraint, context),
|
|
113289
|
+
serializeExistingTypeNodeWithFallback(tp.default, context)
|
|
113290
|
+
);
|
|
113291
|
+
});
|
|
112989
113292
|
}
|
|
112990
113293
|
function typeFromObjectLiteralMethod(method, name, context, isConstContext) {
|
|
112991
113294
|
let returnType = createReturnFromSignature(
|
|
@@ -113085,7 +113388,7 @@ ${lanes.join(`
|
|
|
113085
113388
|
}
|
|
113086
113389
|
function createReturnFromSignature(fn, symbol, context, reportFallback = !0) {
|
|
113087
113390
|
let returnType = failed, returnTypeNode = isJSDocConstructSignature(fn) ? getEffectiveTypeAnnotationNode(fn.parameters[0]) : getEffectiveReturnTypeNode(fn);
|
|
113088
|
-
return returnTypeNode ? returnType = syntacticResult(serializeTypeAnnotationOfDeclaration(returnTypeNode, context, fn, symbol)) : isValueSignatureDeclaration(fn) && (returnType = typeFromSingleReturnExpression(fn, context)), returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, reportFallback && returnType.reportFallback && !returnTypeNode);
|
|
113391
|
+
return returnTypeNode ? returnType = syntacticResult(serializeTypeAnnotationOfDeclaration(returnTypeNode, context, fn, symbol)) : isValueSignatureDeclaration(fn) && (returnType = typeFromSingleReturnExpression(fn, context)), returnType.type !== void 0 ? returnType.type : inferReturnTypeOfSignatureSignature(fn, context, symbol, reportFallback && returnType.reportFallback && !returnTypeNode);
|
|
113089
113392
|
}
|
|
113090
113393
|
function typeFromSingleReturnExpression(declaration, context) {
|
|
113091
113394
|
let candidateExpr;
|
|
@@ -115576,7 +115879,7 @@ ${lanes.join(`
|
|
|
115576
115879
|
return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target, forceCapitalize);
|
|
115577
115880
|
}
|
|
115578
115881
|
function moduleSpecifierToValidIdentifier(moduleSpecifier, target, forceCapitalize) {
|
|
115579
|
-
let baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index")), res = "", lastCharWasValid = !0, firstCharCode = baseName.charCodeAt(0);
|
|
115882
|
+
let baseName = getBaseFileName(removeSuffix(removeFileExtension(moduleSpecifier), "/index")), res = "", lastCharWasValid = !0, firstCharCode = baseName.charCodeAt(0);
|
|
115580
115883
|
isIdentifierStart(firstCharCode, target) ? (res += String.fromCharCode(firstCharCode), forceCapitalize && (res = res.toUpperCase())) : lastCharWasValid = !1;
|
|
115581
115884
|
for (let i = 1; i < baseName.length; i++) {
|
|
115582
115885
|
let ch = baseName.charCodeAt(i), isValid = isIdentifierPart(ch, target);
|
|
@@ -116198,7 +116501,7 @@ ${lanes.join(`
|
|
|
116198
116501
|
let tokenText = scanner2.getTokenText(), lastCharIndex = tokenText.length - 1, numBackslashes = 0;
|
|
116199
116502
|
for (; tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92; )
|
|
116200
116503
|
numBackslashes++;
|
|
116201
|
-
return numBackslashes & 1 ? tokenText.charCodeAt(0) === 34 ? 3 : 2
|
|
116504
|
+
return (numBackslashes & 1) === 0 ? void 0 : tokenText.charCodeAt(0) === 34 ? 3 : 2;
|
|
116202
116505
|
}
|
|
116203
116506
|
case 3:
|
|
116204
116507
|
return scanner2.isUnterminated() ? 1 : void 0;
|
|
@@ -116444,7 +116747,7 @@ ${lanes.join(`
|
|
|
116444
116747
|
}
|
|
116445
116748
|
function classifySymbol(symbol, meaningAtPosition, checker) {
|
|
116446
116749
|
let flags = symbol.getFlags();
|
|
116447
|
-
if (flags & 2885600)
|
|
116750
|
+
if ((flags & 2885600) !== 0)
|
|
116448
116751
|
return flags & 32 ? 11 : flags & 384 ? 12 : flags & 524288 ? 16 : flags & 1536 ? meaningAtPosition & 4 || meaningAtPosition & 1 && hasValueSideModule(symbol) ? 14 : void 0 : flags & 2097152 ? classifySymbol(checker.getAliasedSymbol(symbol), meaningAtPosition, checker) : meaningAtPosition & 2 ? flags & 64 ? 13 : flags & 262144 ? 15 : void 0 : void 0;
|
|
116449
116752
|
}
|
|
116450
116753
|
function hasValueSideModule(symbol) {
|
|
@@ -120236,7 +120539,7 @@ interface Symbol {
|
|
|
120236
120539
|
let unusedImportsFromOldFile = /* @__PURE__ */ new Set();
|
|
120237
120540
|
for (let statement of toMove)
|
|
120238
120541
|
forEachReference(statement, checker, enclosingRange, (symbol, isValidTypeOnlyUseSite) => {
|
|
120239
|
-
if (!symbol.declarations)
|
|
120542
|
+
if (!some(symbol.declarations))
|
|
120240
120543
|
return;
|
|
120241
120544
|
if (existingTargetLocals.has(skipAlias(symbol, checker))) {
|
|
120242
120545
|
unusedImportsFromOldFile.add(symbol);
|
|
@@ -128569,6 +128872,7 @@ ${newComment.split(`
|
|
|
128569
128872
|
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code,
|
|
128570
128873
|
Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code,
|
|
128571
128874
|
Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code,
|
|
128875
|
+
Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code,
|
|
128572
128876
|
Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found.code
|
|
128573
128877
|
];
|
|
128574
128878
|
registerCodeFix({
|
|
@@ -129460,6 +129764,7 @@ ${newComment.split(`
|
|
|
129460
129764
|
case 200:
|
|
129461
129765
|
return 2;
|
|
129462
129766
|
case 100:
|
|
129767
|
+
case 101:
|
|
129463
129768
|
case 199:
|
|
129464
129769
|
return getImpliedNodeFormatForEmit(importingFile, program) === 99 ? 2 : 3;
|
|
129465
129770
|
default:
|
|
@@ -130619,7 +130924,8 @@ ${newComment.split(`
|
|
|
130619
130924
|
Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code,
|
|
130620
130925
|
Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code,
|
|
130621
130926
|
Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code,
|
|
130622
|
-
Diagnostics.Cannot_find_name_0.code
|
|
130927
|
+
Diagnostics.Cannot_find_name_0.code,
|
|
130928
|
+
Diagnostics.Type_0_does_not_satisfy_the_expected_type_1.code
|
|
130623
130929
|
];
|
|
130624
130930
|
registerCodeFix({
|
|
130625
130931
|
errorCodes: errorCodes28,
|
|
@@ -130651,7 +130957,9 @@ ${newComment.split(`
|
|
|
130651
130957
|
return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => {
|
|
130652
130958
|
eachDiagnostic(context, errorCodes28, (diag2) => {
|
|
130653
130959
|
let info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program);
|
|
130654
|
-
if (
|
|
130960
|
+
if (info === void 0) return;
|
|
130961
|
+
let nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text);
|
|
130962
|
+
if (addToSeen(seen, nodeId)) {
|
|
130655
130963
|
if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 || info.kind === 5))
|
|
130656
130964
|
addFunctionDeclaration(changes, context, info);
|
|
130657
130965
|
else if (fixId56 === fixMissingProperties && info.kind === 3)
|
|
@@ -130693,7 +131001,7 @@ ${newComment.split(`
|
|
|
130693
131001
|
}
|
|
130694
131002
|
});
|
|
130695
131003
|
function getInfo10(sourceFile, tokenPos, errorCode, checker, program) {
|
|
130696
|
-
var _a, _b
|
|
131004
|
+
var _a, _b;
|
|
130697
131005
|
let token = getTokenAtPosition(sourceFile, tokenPos), parent2 = token.parent;
|
|
130698
131006
|
if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) {
|
|
130699
131007
|
if (!(token.kind === 19 && isObjectLiteralExpression(parent2) && isCallExpression(parent2.parent))) return;
|
|
@@ -130713,20 +131021,23 @@ ${newComment.split(`
|
|
|
130713
131021
|
));
|
|
130714
131022
|
return length(properties) ? { kind: 3, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent2 } : void 0;
|
|
130715
131023
|
}
|
|
130716
|
-
if (token.kind === 19
|
|
130717
|
-
let
|
|
130718
|
-
|
|
130719
|
-
targetType,
|
|
130720
|
-
|
|
130721
|
-
|
|
130722
|
-
|
|
130723
|
-
|
|
130724
|
-
|
|
130725
|
-
|
|
131024
|
+
if (token.kind === 19 || isSatisfiesExpression(parent2) || isReturnStatement(parent2)) {
|
|
131025
|
+
let expression = (isSatisfiesExpression(parent2) || isReturnStatement(parent2)) && parent2.expression ? parent2.expression : parent2;
|
|
131026
|
+
if (isObjectLiteralExpression(expression)) {
|
|
131027
|
+
let targetType = isSatisfiesExpression(parent2) ? checker.getTypeFromTypeNode(parent2.type) : checker.getContextualType(expression) || checker.getTypeAtLocation(expression), properties = arrayFrom(checker.getUnmatchedProperties(
|
|
131028
|
+
checker.getTypeAtLocation(parent2),
|
|
131029
|
+
targetType.getNonNullableType(),
|
|
131030
|
+
/*requireOptionalProperties*/
|
|
131031
|
+
!1,
|
|
131032
|
+
/*matchDiscriminantProperties*/
|
|
131033
|
+
!1
|
|
131034
|
+
));
|
|
131035
|
+
return length(properties) ? { kind: 3, token: parent2, identifier: void 0, properties, parentDeclaration: expression, indentation: isReturnStatement(expression.parent) || isYieldExpression(expression.parent) ? 0 : void 0 } : void 0;
|
|
131036
|
+
}
|
|
130726
131037
|
}
|
|
130727
131038
|
if (!isMemberName(token)) return;
|
|
130728
131039
|
if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) {
|
|
130729
|
-
let targetType = (
|
|
131040
|
+
let targetType = (_a = checker.getContextualType(token) || checker.getTypeAtLocation(token)) == null ? void 0 : _a.getNonNullableType(), properties = arrayFrom(checker.getUnmatchedProperties(
|
|
130730
131041
|
checker.getTypeAtLocation(parent2.initializer),
|
|
130731
131042
|
targetType,
|
|
130732
131043
|
/*requireOptionalProperties*/
|
|
@@ -130741,7 +131052,7 @@ ${newComment.split(`
|
|
|
130741
131052
|
return length(attributes) ? { kind: 4, token, attributes, parentDeclaration: token.parent } : void 0;
|
|
130742
131053
|
}
|
|
130743
131054
|
if (isIdentifier(token)) {
|
|
130744
|
-
let type = (
|
|
131055
|
+
let type = (_b = checker.getContextualType(token)) == null ? void 0 : _b.getNonNullableType();
|
|
130745
131056
|
if (type && getObjectFlags(type) & 16) {
|
|
130746
131057
|
let signature = firstOrUndefined(checker.getSignaturesOfType(
|
|
130747
131058
|
type,
|
|
@@ -131569,9 +131880,9 @@ ${newComment.split(`
|
|
|
131569
131880
|
}
|
|
131570
131881
|
registerCodeFix({
|
|
131571
131882
|
errorCodes: [
|
|
131572
|
-
Diagnostics.
|
|
131573
|
-
Diagnostics.
|
|
131574
|
-
Diagnostics.
|
|
131883
|
+
Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
|
|
131884
|
+
Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
|
|
131885
|
+
Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code
|
|
131575
131886
|
],
|
|
131576
131887
|
getCodeActions: function(context) {
|
|
131577
131888
|
let compilerOptions = context.program.getCompilerOptions(), { configFile } = compilerOptions;
|
|
@@ -131938,7 +132249,7 @@ ${newComment.split(`
|
|
|
131938
132249
|
} else {
|
|
131939
132250
|
if (isArrayBindingPattern(token.parent.parent) && token.parent.parent.parent.initializer)
|
|
131940
132251
|
break;
|
|
131941
|
-
canDeleteEntireVariableStatement(sourceFile, token) ? deleteEntireVariableStatement(changes, sourceFile, token.parent) : tryDeleteDeclaration(
|
|
132252
|
+
canDeleteEntireVariableStatement(sourceFile, token) ? deleteEntireVariableStatement(changes, sourceFile, token.parent) : isIdentifier(token) && isFunctionDeclaration(token.parent) ? deleteFunctionLikeDeclaration(changes, sourceFile, token.parent) : tryDeleteDeclaration(
|
|
131942
132253
|
sourceFile,
|
|
131943
132254
|
token,
|
|
131944
132255
|
changes,
|
|
@@ -134358,11 +134669,8 @@ ${newComment.split(`
|
|
|
134358
134669
|
return typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget);
|
|
134359
134670
|
}
|
|
134360
134671
|
function typeNodeToAutoImportableTypeNode(typeNode, importAdder, scriptTarget) {
|
|
134361
|
-
|
|
134362
|
-
|
|
134363
|
-
importableReference && (importSymbols(importAdder, importableReference.symbols), typeNode = importableReference.typeNode);
|
|
134364
|
-
}
|
|
134365
|
-
return getSynthesizedDeepClone(typeNode);
|
|
134672
|
+
let importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget);
|
|
134673
|
+
return importableReference && (importSymbols(importAdder, importableReference.symbols), typeNode = importableReference.typeNode), getSynthesizedDeepClone(typeNode);
|
|
134366
134674
|
}
|
|
134367
134675
|
function endOfRequiredTypeParameters(checker, type) {
|
|
134368
134676
|
Debug.assert(type.typeArguments);
|
|
@@ -141247,7 +141555,7 @@ ${newComment.split(`
|
|
|
141247
141555
|
body.kind === 241 ? forEachReturnStatement(body, (returnStatement) => {
|
|
141248
141556
|
returnStatement.expression && addIfImplementation(returnStatement.expression);
|
|
141249
141557
|
}) : addIfImplementation(body);
|
|
141250
|
-
} else isAssertionExpression(typeHavingNode) && addIfImplementation(typeHavingNode.expression);
|
|
141558
|
+
} else (isAssertionExpression(typeHavingNode) || isSatisfiesExpression(typeHavingNode)) && addIfImplementation(typeHavingNode.expression);
|
|
141251
141559
|
function addIfImplementation(e) {
|
|
141252
141560
|
isImplementationExpression(e) && addReference2(e);
|
|
141253
141561
|
}
|
|
@@ -141641,8 +141949,11 @@ ${newComment.split(`
|
|
|
141641
141949
|
if (node === sourceFile)
|
|
141642
141950
|
return;
|
|
141643
141951
|
let { parent: parent2 } = node, typeChecker = program.getTypeChecker();
|
|
141644
|
-
if (node.kind === 164 || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node)
|
|
141645
|
-
|
|
141952
|
+
if (node.kind === 164 || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) {
|
|
141953
|
+
let def = getDefinitionFromOverriddenMember(typeChecker, node);
|
|
141954
|
+
if (def !== void 0 || node.kind !== 164)
|
|
141955
|
+
return def || emptyArray;
|
|
141956
|
+
}
|
|
141646
141957
|
if (isJumpStatementTarget(node)) {
|
|
141647
141958
|
let label = getTargetLabel(node.parent, node.text);
|
|
141648
141959
|
return label ? [createDefinitionInfoFromName(
|
|
@@ -141655,9 +141966,6 @@ ${newComment.split(`
|
|
|
141655
141966
|
)] : void 0;
|
|
141656
141967
|
}
|
|
141657
141968
|
switch (node.kind) {
|
|
141658
|
-
case 107:
|
|
141659
|
-
let functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n));
|
|
141660
|
-
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
141661
141969
|
case 90:
|
|
141662
141970
|
if (!isDefaultClause(node.parent))
|
|
141663
141971
|
break;
|
|
@@ -141668,17 +141976,14 @@ ${newComment.split(`
|
|
|
141668
141976
|
return [createDefinitionInfoFromSwitch(switchStatement, sourceFile)];
|
|
141669
141977
|
break;
|
|
141670
141978
|
}
|
|
141671
|
-
|
|
141672
|
-
|
|
141673
|
-
|
|
141674
|
-
|
|
141675
|
-
|
|
141676
|
-
|
|
141677
|
-
|
|
141678
|
-
|
|
141679
|
-
if (node.kind === 127) {
|
|
141680
|
-
let functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n));
|
|
141681
|
-
return functionDeclaration && functionDeclaration.asteriskToken ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
141979
|
+
let findFunctionDecl;
|
|
141980
|
+
switch (node.kind) {
|
|
141981
|
+
case 107:
|
|
141982
|
+
case 135:
|
|
141983
|
+
case 127:
|
|
141984
|
+
findFunctionDecl = isFunctionLikeDeclaration;
|
|
141985
|
+
let functionDeclaration = findAncestor(node, findFunctionDecl);
|
|
141986
|
+
return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0;
|
|
141682
141987
|
}
|
|
141683
141988
|
if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) {
|
|
141684
141989
|
let classDecl = node.parent.parent, { symbol: symbol2, failedAliasResolution: failedAliasResolution2 } = getSymbol(classDecl, typeChecker, stopAtAlias), staticBlocks = filter(classDecl.members, isClassStaticBlockDeclaration), containerName = symbol2 ? typeChecker.symbolToString(symbol2, classDecl) : "", sourceFile2 = node.getSourceFile();
|
|
@@ -141717,7 +142022,7 @@ ${newComment.split(`
|
|
|
141717
142022
|
unverified: fallbackNode !== node
|
|
141718
142023
|
}];
|
|
141719
142024
|
}
|
|
141720
|
-
if (!symbol)
|
|
142025
|
+
if (isModifier(node) && (isClassElement(parent2) || isNamedDeclaration(parent2)) && (symbol = parent2.symbol), !symbol)
|
|
141721
142026
|
return concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker));
|
|
141722
142027
|
if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) return;
|
|
141723
142028
|
let calledDeclaration = tryGetSignatureDeclaration(typeChecker, node);
|
|
@@ -141900,7 +142205,7 @@ ${newComment.split(`
|
|
|
141900
142205
|
/*stopAtAlias*/
|
|
141901
142206
|
!1
|
|
141902
142207
|
);
|
|
141903
|
-
if (!symbol) return;
|
|
142208
|
+
if (isModifier(node) && (isClassElement(node.parent) || isNamedDeclaration(node.parent)) && (symbol = node.parent.symbol, failedAliasResolution = !1), !symbol) return;
|
|
141904
142209
|
let typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node), returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker), fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution), [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)];
|
|
141905
142210
|
return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551) && symbol.flags & 788968 ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0;
|
|
141906
142211
|
}
|
|
@@ -142289,14 +142594,16 @@ ${newComment.split(`
|
|
|
142289
142594
|
}
|
|
142290
142595
|
function visitFunctionLikeForParameterType(node) {
|
|
142291
142596
|
let signature = checker.getSignatureFromDeclaration(node);
|
|
142292
|
-
if (signature)
|
|
142293
|
-
|
|
142294
|
-
|
|
142295
|
-
|
|
142296
|
-
|
|
142297
|
-
|
|
142298
|
-
|
|
142299
|
-
|
|
142597
|
+
if (!signature)
|
|
142598
|
+
return;
|
|
142599
|
+
let pos = 0;
|
|
142600
|
+
for (let param of node.parameters)
|
|
142601
|
+
isHintableDeclaration(param) && addParameterTypeHint(param, parameterIsThisKeyword(param) ? signature.thisParameter : signature.parameters[pos]), !parameterIsThisKeyword(param) && pos++;
|
|
142602
|
+
}
|
|
142603
|
+
function addParameterTypeHint(node, symbol) {
|
|
142604
|
+
if (getEffectiveTypeAnnotationNode(node) || symbol === void 0) return;
|
|
142605
|
+
let typeHints = getParameterDeclarationTypeHints(symbol);
|
|
142606
|
+
typeHints !== void 0 && addTypeHints(typeHints, node.questionToken ? node.questionToken.end : node.name.end);
|
|
142300
142607
|
}
|
|
142301
142608
|
function getParameterDeclarationTypeHints(symbol) {
|
|
142302
142609
|
let valueDeclaration = symbol.valueDeclaration;
|
|
@@ -150156,6 +150463,7 @@ ${options.prefix}` : `
|
|
|
150156
150463
|
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
150157
150464
|
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
150158
150465
|
createProgram: () => createProgram,
|
|
150466
|
+
createProgramDiagnostics: () => createProgramDiagnostics,
|
|
150159
150467
|
createProgramHost: () => createProgramHost,
|
|
150160
150468
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
|
150161
150469
|
createQueue: () => createQueue,
|
|
@@ -150325,6 +150633,8 @@ ${options.prefix}` : `
|
|
|
150325
150633
|
forEachLeadingCommentRange: () => forEachLeadingCommentRange,
|
|
150326
150634
|
forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft,
|
|
150327
150635
|
forEachNameOfDefaultExport: () => forEachNameOfDefaultExport,
|
|
150636
|
+
forEachOptionsSyntaxByName: () => forEachOptionsSyntaxByName,
|
|
150637
|
+
forEachProjectReference: () => forEachProjectReference,
|
|
150328
150638
|
forEachPropertyAssignment: () => forEachPropertyAssignment,
|
|
150329
150639
|
forEachResolvedProjectReference: () => forEachResolvedProjectReference,
|
|
150330
150640
|
forEachReturnStatement: () => forEachReturnStatement,
|
|
@@ -150564,6 +150874,8 @@ ${options.prefix}` : `
|
|
|
150564
150874
|
getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode,
|
|
150565
150875
|
getLeftmostAccessExpression: () => getLeftmostAccessExpression,
|
|
150566
150876
|
getLeftmostExpression: () => getLeftmostExpression,
|
|
150877
|
+
getLibFileNameFromLibReference: () => getLibFileNameFromLibReference,
|
|
150878
|
+
getLibNameFromLibReference: () => getLibNameFromLibReference,
|
|
150567
150879
|
getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName,
|
|
150568
150880
|
getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition,
|
|
150569
150881
|
getLineInfo: () => getLineInfo,
|
|
@@ -150636,6 +150948,8 @@ ${options.prefix}` : `
|
|
|
150636
150948
|
getOptionFromName: () => getOptionFromName,
|
|
150637
150949
|
getOptionsForLibraryResolution: () => getOptionsForLibraryResolution,
|
|
150638
150950
|
getOptionsNameMap: () => getOptionsNameMap,
|
|
150951
|
+
getOptionsSyntaxByArrayElementValue: () => getOptionsSyntaxByArrayElementValue,
|
|
150952
|
+
getOptionsSyntaxByValue: () => getOptionsSyntaxByValue,
|
|
150639
150953
|
getOrCreateEmitNode: () => getOrCreateEmitNode,
|
|
150640
150954
|
getOrUpdate: () => getOrUpdate,
|
|
150641
150955
|
getOriginalNode: () => getOriginalNode,
|
|
@@ -150672,7 +150986,6 @@ ${options.prefix}` : `
|
|
|
150672
150986
|
getPrivateIdentifier: () => getPrivateIdentifier,
|
|
150673
150987
|
getProperties: () => getProperties,
|
|
150674
150988
|
getProperty: () => getProperty,
|
|
150675
|
-
getPropertyArrayElementValue: () => getPropertyArrayElementValue,
|
|
150676
150989
|
getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression,
|
|
150677
150990
|
getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode,
|
|
150678
150991
|
getPropertyNameFromType: () => getPropertyNameFromType,
|
|
@@ -151583,6 +151896,7 @@ ${options.prefix}` : `
|
|
|
151583
151896
|
moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules,
|
|
151584
151897
|
moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier,
|
|
151585
151898
|
moduleSpecifiers: () => ts_moduleSpecifiers_exports,
|
|
151899
|
+
moduleSupportsImportAttributes: () => moduleSupportsImportAttributes,
|
|
151586
151900
|
moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier,
|
|
151587
151901
|
moveEmitHelpers: () => moveEmitHelpers,
|
|
151588
151902
|
moveRangeEnd: () => moveRangeEnd,
|
|
@@ -152596,7 +152910,7 @@ ${options.prefix}` : `
|
|
|
152596
152910
|
WatchDirectoryKind: () => WatchDirectoryKind2,
|
|
152597
152911
|
WatchFileKind: () => WatchFileKind2
|
|
152598
152912
|
});
|
|
152599
|
-
var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => (CommandTypes2.JsxClosingTag = "jsxClosingTag", CommandTypes2.LinkedEditingRange = "linkedEditingRange", CommandTypes2.Brace = "brace", CommandTypes2.BraceFull = "brace-full", CommandTypes2.BraceCompletion = "braceCompletion", CommandTypes2.GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", CommandTypes2.Change = "change", CommandTypes2.Close = "close", CommandTypes2.Completions = "completions", CommandTypes2.CompletionInfo = "completionInfo", CommandTypes2.CompletionsFull = "completions-full", CommandTypes2.CompletionDetails = "completionEntryDetails", CommandTypes2.CompletionDetailsFull = "completionEntryDetails-full", CommandTypes2.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", CommandTypes2.CompileOnSaveEmitFile = "compileOnSaveEmitFile", CommandTypes2.Configure = "configure", CommandTypes2.Definition = "definition", CommandTypes2.DefinitionFull = "definition-full", CommandTypes2.DefinitionAndBoundSpan = "definitionAndBoundSpan", CommandTypes2.DefinitionAndBoundSpanFull = "definitionAndBoundSpan-full", CommandTypes2.Implementation = "implementation", CommandTypes2.ImplementationFull = "implementation-full", CommandTypes2.EmitOutput = "emit-output", CommandTypes2.Exit = "exit", CommandTypes2.FileReferences = "fileReferences", CommandTypes2.FileReferencesFull = "fileReferences-full", CommandTypes2.Format = "format", CommandTypes2.Formatonkey = "formatonkey", CommandTypes2.FormatFull = "format-full", CommandTypes2.FormatonkeyFull = "formatonkey-full", CommandTypes2.FormatRangeFull = "formatRange-full", CommandTypes2.Geterr = "geterr", CommandTypes2.GeterrForProject = "geterrForProject", CommandTypes2.SemanticDiagnosticsSync = "semanticDiagnosticsSync", CommandTypes2.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", CommandTypes2.SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", CommandTypes2.NavBar = "navbar", CommandTypes2.NavBarFull = "navbar-full", CommandTypes2.Navto = "navto", CommandTypes2.NavtoFull = "navto-full", CommandTypes2.NavTree = "navtree", CommandTypes2.NavTreeFull = "navtree-full", CommandTypes2.DocumentHighlights = "documentHighlights", CommandTypes2.DocumentHighlightsFull = "documentHighlights-full", CommandTypes2.Open = "open", CommandTypes2.Quickinfo = "quickinfo", CommandTypes2.QuickinfoFull = "quickinfo-full", CommandTypes2.References = "references", CommandTypes2.ReferencesFull = "references-full", CommandTypes2.Reload = "reload", CommandTypes2.Rename = "rename", CommandTypes2.RenameInfoFull = "rename-full", CommandTypes2.RenameLocationsFull = "renameLocations-full", CommandTypes2.Saveto = "saveto", CommandTypes2.SignatureHelp = "signatureHelp", CommandTypes2.SignatureHelpFull = "signatureHelp-full", CommandTypes2.FindSourceDefinition = "findSourceDefinition", CommandTypes2.Status = "status", CommandTypes2.TypeDefinition = "typeDefinition", CommandTypes2.ProjectInfo = "projectInfo", CommandTypes2.ReloadProjects = "reloadProjects", CommandTypes2.Unknown = "unknown", CommandTypes2.OpenExternalProject = "openExternalProject", CommandTypes2.OpenExternalProjects = "openExternalProjects", CommandTypes2.CloseExternalProject = "closeExternalProject", CommandTypes2.SynchronizeProjectList = "synchronizeProjectList", CommandTypes2.ApplyChangedToOpenFiles = "applyChangedToOpenFiles", CommandTypes2.UpdateOpen = "updateOpen", CommandTypes2.EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full", CommandTypes2.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full", CommandTypes2.Cleanup = "cleanup", CommandTypes2.GetOutliningSpans = "getOutliningSpans", CommandTypes2.GetOutliningSpansFull = "outliningSpans", CommandTypes2.TodoComments = "todoComments", CommandTypes2.Indentation = "indentation", CommandTypes2.DocCommentTemplate = "docCommentTemplate", CommandTypes2.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full", CommandTypes2.NameOrDottedNameSpan = "nameOrDottedNameSpan", CommandTypes2.BreakpointStatement = "breakpointStatement", CommandTypes2.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", CommandTypes2.GetCodeFixes = "getCodeFixes", CommandTypes2.GetCodeFixesFull = "getCodeFixes-full", CommandTypes2.GetCombinedCodeFix = "getCombinedCodeFix", CommandTypes2.GetCombinedCodeFixFull = "getCombinedCodeFix-full", CommandTypes2.ApplyCodeActionCommand = "applyCodeActionCommand", CommandTypes2.GetSupportedCodeFixes = "getSupportedCodeFixes", CommandTypes2.GetApplicableRefactors = "getApplicableRefactors", CommandTypes2.GetEditsForRefactor = "getEditsForRefactor", CommandTypes2.GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", CommandTypes2.PreparePasteEdits = "preparePasteEdits", CommandTypes2.GetPasteEdits = "getPasteEdits", CommandTypes2.GetEditsForRefactorFull = "getEditsForRefactor-full", CommandTypes2.OrganizeImports = "organizeImports", CommandTypes2.OrganizeImportsFull = "organizeImports-full", CommandTypes2.GetEditsForFileRename = "getEditsForFileRename", CommandTypes2.GetEditsForFileRenameFull = "getEditsForFileRename-full", CommandTypes2.ConfigurePlugin = "configurePlugin", CommandTypes2.SelectionRange = "selectionRange", CommandTypes2.SelectionRangeFull = "selectionRange-full", CommandTypes2.ToggleLineComment = "toggleLineComment", CommandTypes2.ToggleLineCommentFull = "toggleLineComment-full", CommandTypes2.ToggleMultilineComment = "toggleMultilineComment", CommandTypes2.ToggleMultilineCommentFull = "toggleMultilineComment-full", CommandTypes2.CommentSelection = "commentSelection", CommandTypes2.CommentSelectionFull = "commentSelection-full", CommandTypes2.UncommentSelection = "uncommentSelection", CommandTypes2.UncommentSelectionFull = "uncommentSelection-full", CommandTypes2.PrepareCallHierarchy = "prepareCallHierarchy", CommandTypes2.ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", CommandTypes2.ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", CommandTypes2.ProvideInlayHints = "provideInlayHints", CommandTypes2.WatchChange = "watchChange", CommandTypes2.MapCode = "mapCode", CommandTypes2.CopilotRelated = "copilotRelated", CommandTypes2))(CommandTypes || {}), WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => (WatchFileKind3.FixedPollingInterval = "FixedPollingInterval", WatchFileKind3.PriorityPollingInterval = "PriorityPollingInterval", WatchFileKind3.DynamicPriorityPolling = "DynamicPriorityPolling", WatchFileKind3.FixedChunkSizePolling = "FixedChunkSizePolling", WatchFileKind3.UseFsEvents = "UseFsEvents", WatchFileKind3.UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory", WatchFileKind3))(WatchFileKind2 || {}), WatchDirectoryKind2 = /* @__PURE__ */ ((WatchDirectoryKind3) => (WatchDirectoryKind3.UseFsEvents = "UseFsEvents", WatchDirectoryKind3.FixedPollingInterval = "FixedPollingInterval", WatchDirectoryKind3.DynamicPriorityPolling = "DynamicPriorityPolling", WatchDirectoryKind3.FixedChunkSizePolling = "FixedChunkSizePolling", WatchDirectoryKind3))(WatchDirectoryKind2 || {}), PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => (PollingWatchKind3.FixedInterval = "FixedInterval", PollingWatchKind3.PriorityInterval = "PriorityInterval", PollingWatchKind3.DynamicPriority = "DynamicPriority", PollingWatchKind3.FixedChunkSize = "FixedChunkSize", PollingWatchKind3))(PollingWatchKind2 || {}), IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => (IndentStyle3.None = "None", IndentStyle3.Block = "Block", IndentStyle3.Smart = "Smart", IndentStyle3))(IndentStyle2 || {}), JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => (JsxEmit3.None = "none", JsxEmit3.Preserve = "preserve", JsxEmit3.ReactNative = "react-native", JsxEmit3.React = "react", JsxEmit3.ReactJSX = "react-jsx", JsxEmit3.ReactJSXDev = "react-jsxdev", JsxEmit3))(JsxEmit2 || {}), ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => (ModuleKind3.None = "none", ModuleKind3.CommonJS = "commonjs", ModuleKind3.AMD = "amd", ModuleKind3.UMD = "umd", ModuleKind3.System = "system", ModuleKind3.ES6 = "es6", ModuleKind3.ES2015 = "es2015", ModuleKind3.ES2020 = "es2020", ModuleKind3.ES2022 = "es2022", ModuleKind3.ESNext = "esnext", ModuleKind3.Node16 = "node16", ModuleKind3.NodeNext = "nodenext", ModuleKind3.Preserve = "preserve", ModuleKind3))(ModuleKind2 || {}), ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => (ModuleResolutionKind3.Classic = "classic", ModuleResolutionKind3.Node = "node", ModuleResolutionKind3.NodeJs = "node", ModuleResolutionKind3.Node10 = "node10", ModuleResolutionKind3.Node16 = "node16", ModuleResolutionKind3.NodeNext = "nodenext", ModuleResolutionKind3.Bundler = "bundler", ModuleResolutionKind3))(ModuleResolutionKind2 || {}), NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => (NewLineKind3.Crlf = "Crlf", NewLineKind3.Lf = "Lf", NewLineKind3))(NewLineKind2 || {}), ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => (ScriptTarget12.ES3 = "es3", ScriptTarget12.ES5 = "es5", ScriptTarget12.ES6 = "es6", ScriptTarget12.ES2015 = "es2015", ScriptTarget12.ES2016 = "es2016", ScriptTarget12.ES2017 = "es2017", ScriptTarget12.ES2018 = "es2018", ScriptTarget12.ES2019 = "es2019", ScriptTarget12.ES2020 = "es2020", ScriptTarget12.ES2021 = "es2021", ScriptTarget12.ES2022 = "es2022", ScriptTarget12.ES2023 = "es2023", ScriptTarget12.ES2024 = "es2024", ScriptTarget12.ESNext = "esnext", ScriptTarget12.JSON = "json", ScriptTarget12.Latest = "esnext", ScriptTarget12))(ScriptTarget11 || {}), TextStorage = class {
|
|
152913
|
+
var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => (CommandTypes2.JsxClosingTag = "jsxClosingTag", CommandTypes2.LinkedEditingRange = "linkedEditingRange", CommandTypes2.Brace = "brace", CommandTypes2.BraceFull = "brace-full", CommandTypes2.BraceCompletion = "braceCompletion", CommandTypes2.GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", CommandTypes2.Change = "change", CommandTypes2.Close = "close", CommandTypes2.Completions = "completions", CommandTypes2.CompletionInfo = "completionInfo", CommandTypes2.CompletionsFull = "completions-full", CommandTypes2.CompletionDetails = "completionEntryDetails", CommandTypes2.CompletionDetailsFull = "completionEntryDetails-full", CommandTypes2.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", CommandTypes2.CompileOnSaveEmitFile = "compileOnSaveEmitFile", CommandTypes2.Configure = "configure", CommandTypes2.Definition = "definition", CommandTypes2.DefinitionFull = "definition-full", CommandTypes2.DefinitionAndBoundSpan = "definitionAndBoundSpan", CommandTypes2.DefinitionAndBoundSpanFull = "definitionAndBoundSpan-full", CommandTypes2.Implementation = "implementation", CommandTypes2.ImplementationFull = "implementation-full", CommandTypes2.EmitOutput = "emit-output", CommandTypes2.Exit = "exit", CommandTypes2.FileReferences = "fileReferences", CommandTypes2.FileReferencesFull = "fileReferences-full", CommandTypes2.Format = "format", CommandTypes2.Formatonkey = "formatonkey", CommandTypes2.FormatFull = "format-full", CommandTypes2.FormatonkeyFull = "formatonkey-full", CommandTypes2.FormatRangeFull = "formatRange-full", CommandTypes2.Geterr = "geterr", CommandTypes2.GeterrForProject = "geterrForProject", CommandTypes2.SemanticDiagnosticsSync = "semanticDiagnosticsSync", CommandTypes2.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", CommandTypes2.SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", CommandTypes2.NavBar = "navbar", CommandTypes2.NavBarFull = "navbar-full", CommandTypes2.Navto = "navto", CommandTypes2.NavtoFull = "navto-full", CommandTypes2.NavTree = "navtree", CommandTypes2.NavTreeFull = "navtree-full", CommandTypes2.DocumentHighlights = "documentHighlights", CommandTypes2.DocumentHighlightsFull = "documentHighlights-full", CommandTypes2.Open = "open", CommandTypes2.Quickinfo = "quickinfo", CommandTypes2.QuickinfoFull = "quickinfo-full", CommandTypes2.References = "references", CommandTypes2.ReferencesFull = "references-full", CommandTypes2.Reload = "reload", CommandTypes2.Rename = "rename", CommandTypes2.RenameInfoFull = "rename-full", CommandTypes2.RenameLocationsFull = "renameLocations-full", CommandTypes2.Saveto = "saveto", CommandTypes2.SignatureHelp = "signatureHelp", CommandTypes2.SignatureHelpFull = "signatureHelp-full", CommandTypes2.FindSourceDefinition = "findSourceDefinition", CommandTypes2.Status = "status", CommandTypes2.TypeDefinition = "typeDefinition", CommandTypes2.ProjectInfo = "projectInfo", CommandTypes2.ReloadProjects = "reloadProjects", CommandTypes2.Unknown = "unknown", CommandTypes2.OpenExternalProject = "openExternalProject", CommandTypes2.OpenExternalProjects = "openExternalProjects", CommandTypes2.CloseExternalProject = "closeExternalProject", CommandTypes2.SynchronizeProjectList = "synchronizeProjectList", CommandTypes2.ApplyChangedToOpenFiles = "applyChangedToOpenFiles", CommandTypes2.UpdateOpen = "updateOpen", CommandTypes2.EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full", CommandTypes2.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full", CommandTypes2.Cleanup = "cleanup", CommandTypes2.GetOutliningSpans = "getOutliningSpans", CommandTypes2.GetOutliningSpansFull = "outliningSpans", CommandTypes2.TodoComments = "todoComments", CommandTypes2.Indentation = "indentation", CommandTypes2.DocCommentTemplate = "docCommentTemplate", CommandTypes2.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full", CommandTypes2.NameOrDottedNameSpan = "nameOrDottedNameSpan", CommandTypes2.BreakpointStatement = "breakpointStatement", CommandTypes2.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", CommandTypes2.GetCodeFixes = "getCodeFixes", CommandTypes2.GetCodeFixesFull = "getCodeFixes-full", CommandTypes2.GetCombinedCodeFix = "getCombinedCodeFix", CommandTypes2.GetCombinedCodeFixFull = "getCombinedCodeFix-full", CommandTypes2.ApplyCodeActionCommand = "applyCodeActionCommand", CommandTypes2.GetSupportedCodeFixes = "getSupportedCodeFixes", CommandTypes2.GetApplicableRefactors = "getApplicableRefactors", CommandTypes2.GetEditsForRefactor = "getEditsForRefactor", CommandTypes2.GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", CommandTypes2.PreparePasteEdits = "preparePasteEdits", CommandTypes2.GetPasteEdits = "getPasteEdits", CommandTypes2.GetEditsForRefactorFull = "getEditsForRefactor-full", CommandTypes2.OrganizeImports = "organizeImports", CommandTypes2.OrganizeImportsFull = "organizeImports-full", CommandTypes2.GetEditsForFileRename = "getEditsForFileRename", CommandTypes2.GetEditsForFileRenameFull = "getEditsForFileRename-full", CommandTypes2.ConfigurePlugin = "configurePlugin", CommandTypes2.SelectionRange = "selectionRange", CommandTypes2.SelectionRangeFull = "selectionRange-full", CommandTypes2.ToggleLineComment = "toggleLineComment", CommandTypes2.ToggleLineCommentFull = "toggleLineComment-full", CommandTypes2.ToggleMultilineComment = "toggleMultilineComment", CommandTypes2.ToggleMultilineCommentFull = "toggleMultilineComment-full", CommandTypes2.CommentSelection = "commentSelection", CommandTypes2.CommentSelectionFull = "commentSelection-full", CommandTypes2.UncommentSelection = "uncommentSelection", CommandTypes2.UncommentSelectionFull = "uncommentSelection-full", CommandTypes2.PrepareCallHierarchy = "prepareCallHierarchy", CommandTypes2.ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", CommandTypes2.ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", CommandTypes2.ProvideInlayHints = "provideInlayHints", CommandTypes2.WatchChange = "watchChange", CommandTypes2.MapCode = "mapCode", CommandTypes2.CopilotRelated = "copilotRelated", CommandTypes2))(CommandTypes || {}), WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => (WatchFileKind3.FixedPollingInterval = "FixedPollingInterval", WatchFileKind3.PriorityPollingInterval = "PriorityPollingInterval", WatchFileKind3.DynamicPriorityPolling = "DynamicPriorityPolling", WatchFileKind3.FixedChunkSizePolling = "FixedChunkSizePolling", WatchFileKind3.UseFsEvents = "UseFsEvents", WatchFileKind3.UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory", WatchFileKind3))(WatchFileKind2 || {}), WatchDirectoryKind2 = /* @__PURE__ */ ((WatchDirectoryKind3) => (WatchDirectoryKind3.UseFsEvents = "UseFsEvents", WatchDirectoryKind3.FixedPollingInterval = "FixedPollingInterval", WatchDirectoryKind3.DynamicPriorityPolling = "DynamicPriorityPolling", WatchDirectoryKind3.FixedChunkSizePolling = "FixedChunkSizePolling", WatchDirectoryKind3))(WatchDirectoryKind2 || {}), PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => (PollingWatchKind3.FixedInterval = "FixedInterval", PollingWatchKind3.PriorityInterval = "PriorityInterval", PollingWatchKind3.DynamicPriority = "DynamicPriority", PollingWatchKind3.FixedChunkSize = "FixedChunkSize", PollingWatchKind3))(PollingWatchKind2 || {}), IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => (IndentStyle3.None = "None", IndentStyle3.Block = "Block", IndentStyle3.Smart = "Smart", IndentStyle3))(IndentStyle2 || {}), JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => (JsxEmit3.None = "none", JsxEmit3.Preserve = "preserve", JsxEmit3.ReactNative = "react-native", JsxEmit3.React = "react", JsxEmit3.ReactJSX = "react-jsx", JsxEmit3.ReactJSXDev = "react-jsxdev", JsxEmit3))(JsxEmit2 || {}), ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => (ModuleKind3.None = "none", ModuleKind3.CommonJS = "commonjs", ModuleKind3.AMD = "amd", ModuleKind3.UMD = "umd", ModuleKind3.System = "system", ModuleKind3.ES6 = "es6", ModuleKind3.ES2015 = "es2015", ModuleKind3.ES2020 = "es2020", ModuleKind3.ES2022 = "es2022", ModuleKind3.ESNext = "esnext", ModuleKind3.Node16 = "node16", ModuleKind3.Node18 = "node18", ModuleKind3.NodeNext = "nodenext", ModuleKind3.Preserve = "preserve", ModuleKind3))(ModuleKind2 || {}), ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => (ModuleResolutionKind3.Classic = "classic", ModuleResolutionKind3.Node = "node", ModuleResolutionKind3.NodeJs = "node", ModuleResolutionKind3.Node10 = "node10", ModuleResolutionKind3.Node16 = "node16", ModuleResolutionKind3.NodeNext = "nodenext", ModuleResolutionKind3.Bundler = "bundler", ModuleResolutionKind3))(ModuleResolutionKind2 || {}), NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => (NewLineKind3.Crlf = "Crlf", NewLineKind3.Lf = "Lf", NewLineKind3))(NewLineKind2 || {}), ScriptTarget11 = /* @__PURE__ */ ((ScriptTarget12) => (ScriptTarget12.ES3 = "es3", ScriptTarget12.ES5 = "es5", ScriptTarget12.ES6 = "es6", ScriptTarget12.ES2015 = "es2015", ScriptTarget12.ES2016 = "es2016", ScriptTarget12.ES2017 = "es2017", ScriptTarget12.ES2018 = "es2018", ScriptTarget12.ES2019 = "es2019", ScriptTarget12.ES2020 = "es2020", ScriptTarget12.ES2021 = "es2021", ScriptTarget12.ES2022 = "es2022", ScriptTarget12.ES2023 = "es2023", ScriptTarget12.ES2024 = "es2024", ScriptTarget12.ESNext = "esnext", ScriptTarget12.JSON = "json", ScriptTarget12.Latest = "esnext", ScriptTarget12))(ScriptTarget11 || {}), TextStorage = class {
|
|
152600
152914
|
constructor(host, info, initialVersion) {
|
|
152601
152915
|
this.host = host, this.info = info, this.isOpen = !1, this.ownFileText = !1, this.pendingReloadFromDisk = !1, this.version = initialVersion || 0;
|
|
152602
152916
|
}
|
|
@@ -159970,15 +160284,13 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
159970
160284
|
try {
|
|
159971
160285
|
codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file));
|
|
159972
160286
|
} catch (e) {
|
|
159973
|
-
let ls = project.getLanguageService(), existingDiagCodes = [
|
|
160287
|
+
let error2 = e instanceof Error ? e : new Error(e), ls = project.getLanguageService(), existingDiagCodes = [
|
|
159974
160288
|
...ls.getSyntacticDiagnostics(file),
|
|
159975
160289
|
...ls.getSemanticDiagnostics(file),
|
|
159976
160290
|
...ls.getSuggestionDiagnostics(file)
|
|
159977
|
-
].map(
|
|
159978
|
-
|
|
159979
|
-
|
|
159980
|
-
throw badCode !== void 0 && (e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")}); could have caused this error:
|
|
159981
|
-
${e.message}`), e;
|
|
160291
|
+
].filter((d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length)).map((d) => d.code), badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c));
|
|
160292
|
+
throw badCode !== void 0 && (error2.message += `
|
|
160293
|
+
Additional information: BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")})`), error2;
|
|
159982
160294
|
}
|
|
159983
160295
|
return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions;
|
|
159984
160296
|
}
|
|
@@ -175258,4 +175570,4 @@ ejs/lib/ejs.js:
|
|
|
175258
175570
|
* @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
|
|
175259
175571
|
*)
|
|
175260
175572
|
*/
|
|
175261
|
-
//# sourceMappingURL=chunk-
|
|
175573
|
+
//# sourceMappingURL=chunk-5AFYDRV4.js.map
|