@typescript-deploys/pr-build 5.4.0-pr-56681-3 → 5.4.0-pr-56680-2
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/lib/tsc.js +82 -229
- package/lib/tsserver.js +96 -274
- package/lib/typescript.d.ts +2 -24
- package/lib/typescript.js +97 -272
- package/lib/typingsInstaller.js +36 -111
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -115,8 +115,6 @@ __export(server_exports, {
|
|
|
115
115
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
116
116
|
ModifierFlags: () => ModifierFlags,
|
|
117
117
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
118
|
-
ModuleFormatDetectionKind: () => ModuleFormatDetectionKind,
|
|
119
|
-
ModuleFormatInteropKind: () => ModuleFormatInteropKind,
|
|
120
118
|
ModuleInstanceState: () => ModuleInstanceState,
|
|
121
119
|
ModuleKind: () => ModuleKind,
|
|
122
120
|
ModuleResolutionKind: () => ModuleResolutionKind,
|
|
@@ -824,6 +822,7 @@ __export(server_exports, {
|
|
|
824
822
|
getJSDocEnumTag: () => getJSDocEnumTag,
|
|
825
823
|
getJSDocHost: () => getJSDocHost,
|
|
826
824
|
getJSDocImplementsTags: () => getJSDocImplementsTags,
|
|
825
|
+
getJSDocOverloadTags: () => getJSDocOverloadTags,
|
|
827
826
|
getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache,
|
|
828
827
|
getJSDocParameterTags: () => getJSDocParameterTags,
|
|
829
828
|
getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache,
|
|
@@ -891,11 +890,8 @@ __export(server_exports, {
|
|
|
891
890
|
getModeForUsageLocation: () => getModeForUsageLocation,
|
|
892
891
|
getModifiedTime: () => getModifiedTime,
|
|
893
892
|
getModifiers: () => getModifiers,
|
|
894
|
-
getModuleFormatDetectionKind: () => getModuleFormatDetectionKind,
|
|
895
|
-
getModuleFormatInteropKind: () => getModuleFormatInteropKind,
|
|
896
893
|
getModuleInstanceState: () => getModuleInstanceState,
|
|
897
894
|
getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt,
|
|
898
|
-
getModulePreset: () => getModulePreset,
|
|
899
895
|
getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference,
|
|
900
896
|
getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost,
|
|
901
897
|
getNameForExportedSymbol: () => getNameForExportedSymbol,
|
|
@@ -2057,6 +2053,7 @@ __export(server_exports, {
|
|
|
2057
2053
|
removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
|
|
2058
2054
|
repeatString: () => repeatString,
|
|
2059
2055
|
replaceElement: () => replaceElement,
|
|
2056
|
+
replaceFirstStar: () => replaceFirstStar,
|
|
2060
2057
|
resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
|
|
2061
2058
|
resolveConfigFileProjectName: () => resolveConfigFileProjectName,
|
|
2062
2059
|
resolveJSModule: () => resolveJSModule,
|
|
@@ -2337,7 +2334,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2337
2334
|
|
|
2338
2335
|
// src/compiler/corePublic.ts
|
|
2339
2336
|
var versionMajorMinor = "5.4";
|
|
2340
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2337
|
+
var version = `${versionMajorMinor}.0-insiders.20231206`;
|
|
2341
2338
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2342
2339
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2343
2340
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6932,22 +6929,6 @@ var ModuleKind = /* @__PURE__ */ ((ModuleKind3) => {
|
|
|
6932
6929
|
ModuleKind3[ModuleKind3["NodeNext"] = 199] = "NodeNext";
|
|
6933
6930
|
return ModuleKind3;
|
|
6934
6931
|
})(ModuleKind || {});
|
|
6935
|
-
var ModuleFormatDetectionKind = /* @__PURE__ */ ((ModuleFormatDetectionKind2) => {
|
|
6936
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["None"] = 0] = "None";
|
|
6937
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["Bundler"] = 1] = "Bundler";
|
|
6938
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["DefaultModule"] = 2] = "DefaultModule";
|
|
6939
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["DefaultCommonJS"] = 3] = "DefaultCommonJS";
|
|
6940
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["Node16"] = 100] = "Node16";
|
|
6941
|
-
ModuleFormatDetectionKind2[ModuleFormatDetectionKind2["NodeNext"] = 199] = "NodeNext";
|
|
6942
|
-
return ModuleFormatDetectionKind2;
|
|
6943
|
-
})(ModuleFormatDetectionKind || {});
|
|
6944
|
-
var ModuleFormatInteropKind = /* @__PURE__ */ ((ModuleFormatInteropKind2) => {
|
|
6945
|
-
ModuleFormatInteropKind2[ModuleFormatInteropKind2["Babel"] = 1] = "Babel";
|
|
6946
|
-
ModuleFormatInteropKind2[ModuleFormatInteropKind2["BundlerNode"] = 2] = "BundlerNode";
|
|
6947
|
-
ModuleFormatInteropKind2[ModuleFormatInteropKind2["Node16"] = 100] = "Node16";
|
|
6948
|
-
ModuleFormatInteropKind2[ModuleFormatInteropKind2["NodeNext"] = 199] = "NodeNext";
|
|
6949
|
-
return ModuleFormatInteropKind2;
|
|
6950
|
-
})(ModuleFormatInteropKind || {});
|
|
6951
6932
|
var JsxEmit = /* @__PURE__ */ ((JsxEmit3) => {
|
|
6952
6933
|
JsxEmit3[JsxEmit3["None"] = 0] = "None";
|
|
6953
6934
|
JsxEmit3[JsxEmit3["Preserve"] = 1] = "Preserve";
|
|
@@ -10925,9 +10906,6 @@ var Diagnostics = {
|
|
|
10925
10906
|
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "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."),
|
|
10926
10907
|
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
10927
10908
|
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 /* Message */, "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."),
|
|
10928
|
-
Specify_how_files_are_determined_to_be_ECMAScript_modules_or_CommonJS_modules: diag(6805, 3 /* Message */, "Specify_how_files_are_determined_to_be_ECMAScript_modules_or_CommonJS_modules_6805", "Specify how files are determined to be ECMAScript modules or CommonJS modules."),
|
|
10929
|
-
Specify_the_target_runtime_s_rules_for_ESM_CommonJS_interoperation: diag(6806, 3 /* Message */, "Specify_the_target_runtime_s_rules_for_ESM_CommonJS_interoperation_6806", "Specify the target runtime's rules for ESM-CommonJS interoperation."),
|
|
10930
|
-
Specify_defaults_for_module_options_suited_for_common_runtimes_and_bundlers: diag(6807, 3 /* Message */, "Specify_defaults_for_module_options_suited_for_common_runtimes_and_bundlers_6807", "Specify defaults for module options suited for common runtimes and bundlers."),
|
|
10931
10909
|
one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
|
|
10932
10910
|
one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
|
|
10933
10911
|
type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
|
|
@@ -10960,8 +10938,6 @@ var Diagnostics = {
|
|
|
10960
10938
|
Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."),
|
|
10961
10939
|
true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."),
|
|
10962
10940
|
List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."),
|
|
10963
|
-
node16_when_module_is_node16_nodenext_when_module_is_nodenext_none_otherwise: diag(6932, 3 /* Message */, "node16_when_module_is_node16_nodenext_when_module_is_nodenext_none_otherwise_6932", "'node16' when 'module' is 'node16'; 'nodenext' when 'module' is 'nodenext'; 'none' otherwise."),
|
|
10964
|
-
node16_when_module_is_node16_nodenext_when_module_is_nodenext_babel_otherwise: diag(6933, 3 /* Message */, "node16_when_module_is_node16_nodenext_when_module_is_nodenext_babel_otherwise_6933", "'node16' when 'module' is 'node16'; 'nodenext' when 'module' is 'nodenext'; 'babel' otherwise."),
|
|
10965
10941
|
Variable_0_implicitly_has_an_1_type: diag(7005, 1 /* Error */, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."),
|
|
10966
10942
|
Parameter_0_implicitly_has_an_1_type: diag(7006, 1 /* Error */, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."),
|
|
10967
10943
|
Member_0_implicitly_has_an_1_type: diag(7008, 1 /* Error */, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."),
|
|
@@ -17782,12 +17758,12 @@ function canHaveJSDoc(node) {
|
|
|
17782
17758
|
function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
17783
17759
|
let result;
|
|
17784
17760
|
if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) {
|
|
17785
|
-
result = addRange(result, filterOwnedJSDocTags(hostNode,
|
|
17761
|
+
result = addRange(result, filterOwnedJSDocTags(hostNode, hostNode.initializer.jsDoc));
|
|
17786
17762
|
}
|
|
17787
17763
|
let node = hostNode;
|
|
17788
17764
|
while (node && node.parent) {
|
|
17789
17765
|
if (hasJSDocNodes(node)) {
|
|
17790
|
-
result = addRange(result, filterOwnedJSDocTags(hostNode,
|
|
17766
|
+
result = addRange(result, filterOwnedJSDocTags(hostNode, node.jsDoc));
|
|
17791
17767
|
}
|
|
17792
17768
|
if (node.kind === 169 /* Parameter */) {
|
|
17793
17769
|
result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node));
|
|
@@ -17801,12 +17777,16 @@ function getJSDocCommentsAndTags(hostNode, noCache) {
|
|
|
17801
17777
|
}
|
|
17802
17778
|
return result || emptyArray;
|
|
17803
17779
|
}
|
|
17804
|
-
function filterOwnedJSDocTags(hostNode,
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17780
|
+
function filterOwnedJSDocTags(hostNode, comments) {
|
|
17781
|
+
const lastJsDoc = last(comments);
|
|
17782
|
+
return flatMap(comments, (jsDoc) => {
|
|
17783
|
+
if (jsDoc === lastJsDoc) {
|
|
17784
|
+
const ownedTags = filter(jsDoc.tags, (tag) => ownsJSDocTag(hostNode, tag));
|
|
17785
|
+
return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags;
|
|
17786
|
+
} else {
|
|
17787
|
+
return filter(jsDoc.tags, isJSDocOverloadTag);
|
|
17788
|
+
}
|
|
17789
|
+
});
|
|
17810
17790
|
}
|
|
17811
17791
|
function ownsJSDocTag(hostNode, tag) {
|
|
17812
17792
|
return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode;
|
|
@@ -17845,6 +17825,9 @@ function getEffectiveContainerForJSDocTemplateTag(node) {
|
|
|
17845
17825
|
}
|
|
17846
17826
|
return getHostSignatureFromJSDoc(node);
|
|
17847
17827
|
}
|
|
17828
|
+
function getJSDocOverloadTags(node) {
|
|
17829
|
+
return getAllJSDocTags(node, isJSDocOverloadTag);
|
|
17830
|
+
}
|
|
17848
17831
|
function getHostSignatureFromJSDoc(node) {
|
|
17849
17832
|
const host = getEffectiveJSDocHost(node);
|
|
17850
17833
|
if (host) {
|
|
@@ -20542,46 +20525,11 @@ function getEmitScriptTarget(compilerOptions) {
|
|
|
20542
20525
|
return compilerOptions.target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */);
|
|
20543
20526
|
}
|
|
20544
20527
|
function getEmitModuleKind(compilerOptions) {
|
|
20545
|
-
if (typeof compilerOptions.module === "object" && compilerOptions.module.emit !== void 0) {
|
|
20546
|
-
return compilerOptions.module.emit;
|
|
20547
|
-
}
|
|
20548
20528
|
return typeof compilerOptions.module === "number" ? compilerOptions.module : getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */;
|
|
20549
20529
|
}
|
|
20550
20530
|
function emitModuleKindIsNonNodeESM(moduleKind) {
|
|
20551
20531
|
return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
|
|
20552
20532
|
}
|
|
20553
|
-
function getModulePreset(compilerOptions) {
|
|
20554
|
-
if (typeof compilerOptions.module === "object") {
|
|
20555
|
-
return compilerOptions.module.preset;
|
|
20556
|
-
}
|
|
20557
|
-
return compilerOptions.module;
|
|
20558
|
-
}
|
|
20559
|
-
function getModuleFormatDetectionKind(compilerOptions) {
|
|
20560
|
-
if (typeof compilerOptions.module === "object" && compilerOptions.module.formatDetection !== void 0) {
|
|
20561
|
-
return compilerOptions.module.formatDetection;
|
|
20562
|
-
}
|
|
20563
|
-
switch (getModulePreset(compilerOptions)) {
|
|
20564
|
-
case 100 /* Node16 */:
|
|
20565
|
-
return 100 /* Node16 */;
|
|
20566
|
-
case 199 /* NodeNext */:
|
|
20567
|
-
return 199 /* NodeNext */;
|
|
20568
|
-
default:
|
|
20569
|
-
return 0 /* None */;
|
|
20570
|
-
}
|
|
20571
|
-
}
|
|
20572
|
-
function getModuleFormatInteropKind(compilerOptions) {
|
|
20573
|
-
if (typeof compilerOptions.module === "object" && compilerOptions.module.formatInterop !== void 0) {
|
|
20574
|
-
return compilerOptions.module.formatInterop;
|
|
20575
|
-
}
|
|
20576
|
-
switch (getModulePreset(compilerOptions)) {
|
|
20577
|
-
case 100 /* Node16 */:
|
|
20578
|
-
return 100 /* Node16 */;
|
|
20579
|
-
case 199 /* NodeNext */:
|
|
20580
|
-
return 199 /* NodeNext */;
|
|
20581
|
-
default:
|
|
20582
|
-
return 1 /* Babel */;
|
|
20583
|
-
}
|
|
20584
|
-
}
|
|
20585
20533
|
function getEmitModuleResolutionKind(compilerOptions) {
|
|
20586
20534
|
let moduleResolution = compilerOptions.moduleResolution;
|
|
20587
20535
|
if (moduleResolution === void 0) {
|
|
@@ -21807,6 +21755,10 @@ function hasResolutionModeOverride(node) {
|
|
|
21807
21755
|
}
|
|
21808
21756
|
return !!getResolutionModeOverride(node.attributes);
|
|
21809
21757
|
}
|
|
21758
|
+
var stringReplace = String.prototype.replace;
|
|
21759
|
+
function replaceFirstStar(s, replacement) {
|
|
21760
|
+
return stringReplace.call(s, "*", replacement);
|
|
21761
|
+
}
|
|
21810
21762
|
|
|
21811
21763
|
// src/compiler/factory/baseNodeFactory.ts
|
|
21812
21764
|
function createBaseNodeFactory() {
|
|
@@ -38682,79 +38634,23 @@ var targetOptionDeclaration = {
|
|
|
38682
38634
|
description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38683
38635
|
defaultValueDescription: 1 /* ES5 */
|
|
38684
38636
|
};
|
|
38685
|
-
var moduleKindMap = new Map(Object.entries({
|
|
38686
|
-
none: 0 /* None */,
|
|
38687
|
-
commonjs: 1 /* CommonJS */,
|
|
38688
|
-
amd: 2 /* AMD */,
|
|
38689
|
-
system: 4 /* System */,
|
|
38690
|
-
umd: 3 /* UMD */,
|
|
38691
|
-
es6: 5 /* ES2015 */,
|
|
38692
|
-
es2015: 5 /* ES2015 */,
|
|
38693
|
-
es2020: 6 /* ES2020 */,
|
|
38694
|
-
es2022: 7 /* ES2022 */,
|
|
38695
|
-
esnext: 99 /* ESNext */,
|
|
38696
|
-
node16: 100 /* Node16 */,
|
|
38697
|
-
nodenext: 199 /* NodeNext */
|
|
38698
|
-
}));
|
|
38699
|
-
var moduleSubOptionDeclarations = [
|
|
38700
|
-
{
|
|
38701
|
-
name: "preset",
|
|
38702
|
-
type: moduleKindMap,
|
|
38703
|
-
affectsSourceFile: true,
|
|
38704
|
-
affectsBuildInfo: true,
|
|
38705
|
-
affectsEmit: true,
|
|
38706
|
-
affectsSemanticDiagnostics: true,
|
|
38707
|
-
category: Diagnostics.Modules,
|
|
38708
|
-
description: Diagnostics.Specify_defaults_for_module_options_suited_for_common_runtimes_and_bundlers,
|
|
38709
|
-
defaultValueDescription: void 0,
|
|
38710
|
-
getParentOption: getModuleOptionDeclaration
|
|
38711
|
-
},
|
|
38712
|
-
{
|
|
38713
|
-
name: "formatDetection",
|
|
38714
|
-
type: new Map(Object.entries({
|
|
38715
|
-
none: 0 /* None */,
|
|
38716
|
-
bundler: 1 /* Bundler */,
|
|
38717
|
-
node16: 100 /* Node16 */,
|
|
38718
|
-
nodenext: 199 /* NodeNext */
|
|
38719
|
-
})),
|
|
38720
|
-
affectsModuleResolution: true,
|
|
38721
|
-
affectsSemanticDiagnostics: true,
|
|
38722
|
-
affectsEmit: true,
|
|
38723
|
-
category: Diagnostics.Modules,
|
|
38724
|
-
description: Diagnostics.Specify_how_files_are_determined_to_be_ECMAScript_modules_or_CommonJS_modules,
|
|
38725
|
-
defaultValueDescription: Diagnostics.node16_when_module_is_node16_nodenext_when_module_is_nodenext_none_otherwise,
|
|
38726
|
-
getParentOption: getModuleOptionDeclaration
|
|
38727
|
-
},
|
|
38728
|
-
{
|
|
38729
|
-
name: "formatInterop",
|
|
38730
|
-
type: new Map(Object.entries({
|
|
38731
|
-
babel: 1 /* Babel */,
|
|
38732
|
-
bundlernode: 2 /* BundlerNode */,
|
|
38733
|
-
node16: 100 /* Node16 */,
|
|
38734
|
-
nodenext: 199 /* NodeNext */
|
|
38735
|
-
})),
|
|
38736
|
-
affectsSemanticDiagnostics: true,
|
|
38737
|
-
category: Diagnostics.Modules,
|
|
38738
|
-
description: Diagnostics.Specify_the_target_runtime_s_rules_for_ESM_CommonJS_interoperation,
|
|
38739
|
-
defaultValueDescription: Diagnostics.node16_when_module_is_node16_nodenext_when_module_is_nodenext_babel_otherwise,
|
|
38740
|
-
getParentOption: getModuleOptionDeclaration
|
|
38741
|
-
},
|
|
38742
|
-
{
|
|
38743
|
-
name: "emit",
|
|
38744
|
-
type: moduleKindMap,
|
|
38745
|
-
affectsEmit: true,
|
|
38746
|
-
category: Diagnostics.Modules,
|
|
38747
|
-
description: Diagnostics.Specify_what_module_code_is_generated,
|
|
38748
|
-
defaultValueDescription: void 0,
|
|
38749
|
-
getParentOption: getModuleOptionDeclaration
|
|
38750
|
-
}
|
|
38751
|
-
];
|
|
38752
38637
|
var moduleOptionDeclaration = {
|
|
38753
38638
|
name: "module",
|
|
38754
38639
|
shortName: "m",
|
|
38755
|
-
type:
|
|
38756
|
-
|
|
38757
|
-
|
|
38640
|
+
type: new Map(Object.entries({
|
|
38641
|
+
none: 0 /* None */,
|
|
38642
|
+
commonjs: 1 /* CommonJS */,
|
|
38643
|
+
amd: 2 /* AMD */,
|
|
38644
|
+
system: 4 /* System */,
|
|
38645
|
+
umd: 3 /* UMD */,
|
|
38646
|
+
es6: 5 /* ES2015 */,
|
|
38647
|
+
es2015: 5 /* ES2015 */,
|
|
38648
|
+
es2020: 6 /* ES2020 */,
|
|
38649
|
+
es2022: 7 /* ES2022 */,
|
|
38650
|
+
esnext: 99 /* ESNext */,
|
|
38651
|
+
node16: 100 /* Node16 */,
|
|
38652
|
+
nodenext: 199 /* NodeNext */
|
|
38653
|
+
})),
|
|
38758
38654
|
affectsSourceFile: true,
|
|
38759
38655
|
affectsModuleResolution: true,
|
|
38760
38656
|
affectsEmit: true,
|
|
@@ -38765,9 +38661,6 @@ var moduleOptionDeclaration = {
|
|
|
38765
38661
|
description: Diagnostics.Specify_what_module_code_is_generated,
|
|
38766
38662
|
defaultValueDescription: void 0
|
|
38767
38663
|
};
|
|
38768
|
-
function getModuleOptionDeclaration() {
|
|
38769
|
-
return moduleOptionDeclaration;
|
|
38770
|
-
}
|
|
38771
38664
|
var commandOptionsWithoutBuild = [
|
|
38772
38665
|
// CommandLine only options
|
|
38773
38666
|
{
|
|
@@ -38834,9 +38727,6 @@ var commandOptionsWithoutBuild = [
|
|
|
38834
38727
|
// Basic
|
|
38835
38728
|
targetOptionDeclaration,
|
|
38836
38729
|
moduleOptionDeclaration,
|
|
38837
|
-
// HEAD
|
|
38838
|
-
//
|
|
38839
|
-
// parent of 19e60f1a19 (Fix showConfig)
|
|
38840
38730
|
{
|
|
38841
38731
|
name: "lib",
|
|
38842
38732
|
type: "list",
|
|
@@ -39833,16 +39723,10 @@ function createOptionNameMap(optionDeclarations2) {
|
|
|
39833
39723
|
const optionsNameMap = /* @__PURE__ */ new Map();
|
|
39834
39724
|
const shortOptionNames = /* @__PURE__ */ new Map();
|
|
39835
39725
|
forEach(optionDeclarations2, (option) => {
|
|
39836
|
-
|
|
39837
|
-
optionsNameMap.set(lowerCaseName, option);
|
|
39726
|
+
optionsNameMap.set(option.name.toLowerCase(), option);
|
|
39838
39727
|
if (option.shortName) {
|
|
39839
39728
|
shortOptionNames.set(option.shortName, option.name);
|
|
39840
39729
|
}
|
|
39841
|
-
if (option.type === "objectOrShorthand") {
|
|
39842
|
-
forEachEntry(option.elementOptions, (subOption, subOptionName) => {
|
|
39843
|
-
optionsNameMap.set(`${lowerCaseName}.${subOptionName.toLowerCase()}`, subOption);
|
|
39844
|
-
});
|
|
39845
|
-
}
|
|
39846
39730
|
});
|
|
39847
39731
|
return { optionsNameMap, shortOptionNames };
|
|
39848
39732
|
}
|
|
@@ -39866,8 +39750,7 @@ function createCompilerDiagnosticForInvalidCustomType(opt) {
|
|
|
39866
39750
|
return createDiagnosticForInvalidCustomType(opt, createCompilerDiagnostic);
|
|
39867
39751
|
}
|
|
39868
39752
|
function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
|
|
39869
|
-
const
|
|
39870
|
-
const namesOfType = arrayFrom(type.keys());
|
|
39753
|
+
const namesOfType = arrayFrom(opt.type.keys());
|
|
39871
39754
|
const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key) => `'${key}'`).join(", ");
|
|
39872
39755
|
return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames);
|
|
39873
39756
|
}
|
|
@@ -39990,7 +39873,6 @@ function parseCommandLineWorker(diagnostics, commandLine, readFile) {
|
|
|
39990
39873
|
}
|
|
39991
39874
|
}
|
|
39992
39875
|
function parseOptionValue(args, i, diagnostics, opt, options, errors) {
|
|
39993
|
-
var _a;
|
|
39994
39876
|
if (opt.isTSConfigOnly) {
|
|
39995
39877
|
const optValue = args[i];
|
|
39996
39878
|
if (optValue === "null") {
|
|
@@ -40019,46 +39901,40 @@ function parseOptionValue(args, i, diagnostics, opt, options, errors) {
|
|
|
40019
39901
|
if (!args[i] && opt.type !== "boolean") {
|
|
40020
39902
|
errors.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt)));
|
|
40021
39903
|
}
|
|
40022
|
-
const parentOption = (_a = opt.getParentOption) == null ? void 0 : _a.call(opt);
|
|
40023
|
-
const [base = {}, name] = parentOption ? [options[parentOption.name], opt.name] : [options, opt.name];
|
|
40024
|
-
if (parentOption) {
|
|
40025
|
-
options[parentOption.name] = base;
|
|
40026
|
-
}
|
|
40027
39904
|
if (args[i] !== "null") {
|
|
40028
|
-
switch (opt.type
|
|
39905
|
+
switch (opt.type) {
|
|
40029
39906
|
case "number":
|
|
40030
|
-
|
|
39907
|
+
options[opt.name] = validateJsonOptionValue(opt, parseInt(args[i]), errors);
|
|
40031
39908
|
i++;
|
|
40032
39909
|
break;
|
|
40033
39910
|
case "boolean":
|
|
40034
39911
|
const optValue = args[i];
|
|
40035
|
-
|
|
39912
|
+
options[opt.name] = validateJsonOptionValue(opt, optValue !== "false", errors);
|
|
40036
39913
|
if (optValue === "false" || optValue === "true") {
|
|
40037
39914
|
i++;
|
|
40038
39915
|
}
|
|
40039
39916
|
break;
|
|
40040
39917
|
case "string":
|
|
40041
|
-
|
|
39918
|
+
options[opt.name] = validateJsonOptionValue(opt, args[i] || "", errors);
|
|
40042
39919
|
i++;
|
|
40043
39920
|
break;
|
|
40044
39921
|
case "list":
|
|
40045
39922
|
const result = parseListTypeOption(opt, args[i], errors);
|
|
40046
|
-
|
|
39923
|
+
options[opt.name] = result || [];
|
|
40047
39924
|
if (result) {
|
|
40048
39925
|
i++;
|
|
40049
39926
|
}
|
|
40050
39927
|
break;
|
|
40051
|
-
case "object":
|
|
40052
39928
|
case "listOrElement":
|
|
40053
|
-
Debug.fail("listOrElement
|
|
39929
|
+
Debug.fail("listOrElement not supported here");
|
|
40054
39930
|
break;
|
|
40055
39931
|
default:
|
|
40056
|
-
|
|
39932
|
+
options[opt.name] = parseCustomTypeOption(opt, args[i], errors);
|
|
40057
39933
|
i++;
|
|
40058
39934
|
break;
|
|
40059
39935
|
}
|
|
40060
39936
|
} else {
|
|
40061
|
-
|
|
39937
|
+
options[opt.name] = void 0;
|
|
40062
39938
|
i++;
|
|
40063
39939
|
}
|
|
40064
39940
|
}
|
|
@@ -40431,23 +40307,17 @@ function isCompilerOptionsValue(option, value) {
|
|
|
40431
40307
|
if (option) {
|
|
40432
40308
|
if (isNullOrUndefined(value))
|
|
40433
40309
|
return !option.disallowNullOrUndefined;
|
|
40434
|
-
if (option.type === "
|
|
40435
|
-
return
|
|
40310
|
+
if (option.type === "list") {
|
|
40311
|
+
return isArray(value);
|
|
40436
40312
|
}
|
|
40437
|
-
if (option.type === "
|
|
40438
|
-
return
|
|
40313
|
+
if (option.type === "listOrElement") {
|
|
40314
|
+
return isArray(value) || isCompilerOptionsValue(option.element, value);
|
|
40439
40315
|
}
|
|
40440
|
-
|
|
40316
|
+
const expectedType = isString(option.type) ? option.type : "string";
|
|
40317
|
+
return typeof value === expectedType;
|
|
40441
40318
|
}
|
|
40442
40319
|
return false;
|
|
40443
40320
|
}
|
|
40444
|
-
function isCompilerOptionsValueWorker(type, value) {
|
|
40445
|
-
if (type === "list") {
|
|
40446
|
-
return isArray(value);
|
|
40447
|
-
}
|
|
40448
|
-
const expectedType = isString(type) ? type : "string";
|
|
40449
|
-
return typeof value === expectedType;
|
|
40450
|
-
}
|
|
40451
40321
|
function convertToTSConfig(configParseResult, configFileName, host) {
|
|
40452
40322
|
var _a, _b, _c;
|
|
40453
40323
|
const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
@@ -40531,8 +40401,6 @@ function getCustomTypeMapOfCommandLineOption(optionDefinition) {
|
|
|
40531
40401
|
case "list":
|
|
40532
40402
|
case "listOrElement":
|
|
40533
40403
|
return getCustomTypeMapOfCommandLineOption(optionDefinition.element);
|
|
40534
|
-
case "objectOrShorthand":
|
|
40535
|
-
return typeof optionDefinition.shorthandType === "object" ? optionDefinition.shorthandType : void 0;
|
|
40536
40404
|
default:
|
|
40537
40405
|
return optionDefinition.type;
|
|
40538
40406
|
}
|
|
@@ -41046,7 +40914,6 @@ function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileNa
|
|
|
41046
40914
|
const options = getDefaultCompilerOptions(configFileName);
|
|
41047
40915
|
let typeAcquisition;
|
|
41048
40916
|
let watchOptions;
|
|
41049
|
-
let moduleOption;
|
|
41050
40917
|
let extendedConfigPath;
|
|
41051
40918
|
let rootCompilerOptions;
|
|
41052
40919
|
const rootOptions = getTsconfigRootOptionsMap();
|
|
@@ -41074,8 +40941,6 @@ function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileNa
|
|
|
41074
40941
|
currentOption = watchOptions ?? (watchOptions = {});
|
|
41075
40942
|
else if (parentOption === typeAcquisitionDeclaration)
|
|
41076
40943
|
currentOption = typeAcquisition ?? (typeAcquisition = getDefaultTypeAcquisition(configFileName));
|
|
41077
|
-
else if (parentOption === moduleOptionDeclaration)
|
|
41078
|
-
currentOption = moduleOption ?? (moduleOption = {});
|
|
41079
40944
|
else
|
|
41080
40945
|
Debug.fail("Unknown option");
|
|
41081
40946
|
currentOption[option.name] = value;
|
|
@@ -41247,16 +41112,6 @@ function convertJsonOption(opt, value, basePath, errors, propertyAssignment, val
|
|
|
41247
41112
|
return convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);
|
|
41248
41113
|
} else if (optType === "listOrElement") {
|
|
41249
41114
|
return isArray(value) ? convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile) : convertJsonOption(opt.element, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);
|
|
41250
|
-
} else if (optType === "objectOrShorthand") {
|
|
41251
|
-
if (!value || typeof value !== "object") {
|
|
41252
|
-
if (!isString(opt.shorthandType)) {
|
|
41253
|
-
return convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile);
|
|
41254
|
-
}
|
|
41255
|
-
const validatedValue2 = validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile);
|
|
41256
|
-
return isNullOrUndefined(validatedValue2) ? validatedValue2 : normalizeNonListOptionValue(opt, basePath, validatedValue2);
|
|
41257
|
-
} else {
|
|
41258
|
-
return {};
|
|
41259
|
-
}
|
|
41260
41115
|
} else if (!isString(opt.type)) {
|
|
41261
41116
|
return convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile);
|
|
41262
41117
|
}
|
|
@@ -41289,8 +41144,7 @@ function convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sour
|
|
|
41289
41144
|
if (isNullOrUndefined(value))
|
|
41290
41145
|
return void 0;
|
|
41291
41146
|
const key = value.toLowerCase();
|
|
41292
|
-
const
|
|
41293
|
-
const val = type.get(key);
|
|
41147
|
+
const val = opt.type.get(key);
|
|
41294
41148
|
if (val !== void 0) {
|
|
41295
41149
|
return validateJsonOptionValue(opt, val, errors, valueExpression, sourceFile);
|
|
41296
41150
|
} else {
|
|
@@ -41529,18 +41383,11 @@ function convertCompilerOptionsForTelemetry(opts) {
|
|
|
41529
41383
|
return out;
|
|
41530
41384
|
}
|
|
41531
41385
|
function getOptionValueWithEmptyStrings(value, option) {
|
|
41532
|
-
if (value === void 0
|
|
41386
|
+
if (value === void 0)
|
|
41533
41387
|
return value;
|
|
41534
|
-
|
|
41535
|
-
switch (type) {
|
|
41388
|
+
switch (option.type) {
|
|
41536
41389
|
case "object":
|
|
41537
41390
|
return "";
|
|
41538
|
-
case "objectOrShorthand":
|
|
41539
|
-
return getOwnKeys(value).reduce((acc, key) => {
|
|
41540
|
-
const subOption = option.elementOptions.get(key.toLowerCase());
|
|
41541
|
-
acc[key] = subOption ? getOptionValueWithEmptyStrings(value[key], subOption) : "";
|
|
41542
|
-
return acc;
|
|
41543
|
-
}, {});
|
|
41544
41391
|
case "string":
|
|
41545
41392
|
return "";
|
|
41546
41393
|
case "number":
|
|
@@ -41554,7 +41401,7 @@ function getOptionValueWithEmptyStrings(value, option) {
|
|
|
41554
41401
|
const elementType = option.element;
|
|
41555
41402
|
return isArray(value) ? mapDefined(value, (v) => getOptionValueWithEmptyStrings(v, elementType)) : "";
|
|
41556
41403
|
default:
|
|
41557
|
-
return forEachEntry(type, (optionEnumValue, optionStringValue) => {
|
|
41404
|
+
return forEachEntry(option.type, (optionEnumValue, optionStringValue) => {
|
|
41558
41405
|
if (optionEnumValue === value) {
|
|
41559
41406
|
return optionStringValue;
|
|
41560
41407
|
}
|
|
@@ -41562,8 +41409,7 @@ function getOptionValueWithEmptyStrings(value, option) {
|
|
|
41562
41409
|
}
|
|
41563
41410
|
}
|
|
41564
41411
|
function getDefaultValueForOption(option) {
|
|
41565
|
-
|
|
41566
|
-
switch (type) {
|
|
41412
|
+
switch (option.type) {
|
|
41567
41413
|
case "number":
|
|
41568
41414
|
return 1;
|
|
41569
41415
|
case "boolean":
|
|
@@ -43167,7 +43013,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
|
|
|
43167
43013
|
/*excludes*/
|
|
43168
43014
|
void 0,
|
|
43169
43015
|
[
|
|
43170
|
-
isDeclarationFileName(target) ? target
|
|
43016
|
+
isDeclarationFileName(target) ? replaceFirstStar(target, "**/*") : changeAnyExtension(replaceFirstStar(target, "**/*"), getDeclarationEmitExtensionForPath(target))
|
|
43171
43017
|
]
|
|
43172
43018
|
).forEach((entry) => {
|
|
43173
43019
|
entrypoints = appendIfUnique(entrypoints, {
|
|
@@ -43987,7 +43833,7 @@ function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, p
|
|
|
43987
43833
|
trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
|
|
43988
43834
|
}
|
|
43989
43835
|
const resolved = forEach(paths[matchedPatternText], (subst) => {
|
|
43990
|
-
const path = matchedStar ? subst
|
|
43836
|
+
const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
|
|
43991
43837
|
const candidate = normalizePath(combinePaths(baseDirectory, path));
|
|
43992
43838
|
if (state.traceEnabled) {
|
|
43993
43839
|
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
|
|
@@ -47687,7 +47533,7 @@ function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, hos
|
|
|
47687
47533
|
if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) {
|
|
47688
47534
|
const matchedStar = value.substring(prefix.length, value.length - suffix.length);
|
|
47689
47535
|
if (!pathIsRelative(matchedStar)) {
|
|
47690
|
-
return key
|
|
47536
|
+
return replaceFirstStar(key, matchedStar);
|
|
47691
47537
|
}
|
|
47692
47538
|
}
|
|
47693
47539
|
}
|
|
@@ -47735,11 +47581,11 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory,
|
|
|
47735
47581
|
const trailingSlice = pathOrPattern.slice(starPos + 1);
|
|
47736
47582
|
if (startsWith(targetFilePath, leadingSlice) && endsWith(targetFilePath, trailingSlice)) {
|
|
47737
47583
|
const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
|
|
47738
|
-
return { moduleFileToTry: packageName
|
|
47584
|
+
return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
|
|
47739
47585
|
}
|
|
47740
47586
|
if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice) && endsWith(extensionSwappedTarget, trailingSlice)) {
|
|
47741
47587
|
const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);
|
|
47742
|
-
return { moduleFileToTry: packageName
|
|
47588
|
+
return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) };
|
|
47743
47589
|
}
|
|
47744
47590
|
break;
|
|
47745
47591
|
}
|
|
@@ -50527,16 +50373,19 @@ function createTypeChecker(host) {
|
|
|
50527
50373
|
return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0;
|
|
50528
50374
|
}
|
|
50529
50375
|
function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) {
|
|
50530
|
-
return usageMode === 99 /* ESNext */ && targetMode
|
|
50376
|
+
return usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */;
|
|
50531
50377
|
}
|
|
50532
50378
|
function isOnlyImportedAsDefault(usage) {
|
|
50533
50379
|
const usageMode = getUsageModeForExpression(usage);
|
|
50534
50380
|
return usageMode === 99 /* ESNext */ && endsWith(usage.text, ".json" /* Json */);
|
|
50535
50381
|
}
|
|
50536
50382
|
function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage) {
|
|
50537
|
-
const usageMode = file &&
|
|
50538
|
-
if (
|
|
50539
|
-
|
|
50383
|
+
const usageMode = file && getUsageModeForExpression(usage);
|
|
50384
|
+
if (file && usageMode !== void 0) {
|
|
50385
|
+
const result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat);
|
|
50386
|
+
if (usageMode === 99 /* ESNext */ || result) {
|
|
50387
|
+
return result;
|
|
50388
|
+
}
|
|
50540
50389
|
}
|
|
50541
50390
|
if (!allowSyntheticDefaultImports) {
|
|
50542
50391
|
return false;
|
|
@@ -51429,7 +51278,6 @@ function createTypeChecker(host) {
|
|
|
51429
51278
|
const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal);
|
|
51430
51279
|
const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
|
|
51431
51280
|
const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions);
|
|
51432
|
-
const moduleFormatInterop = getModuleFormatInteropKind(compilerOptions);
|
|
51433
51281
|
const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule;
|
|
51434
51282
|
const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile);
|
|
51435
51283
|
const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName);
|
|
@@ -51465,7 +51313,7 @@ function createTypeChecker(host) {
|
|
|
51465
51313
|
moduleReference
|
|
51466
51314
|
);
|
|
51467
51315
|
}
|
|
51468
|
-
if (
|
|
51316
|
+
if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) {
|
|
51469
51317
|
const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration);
|
|
51470
51318
|
const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l));
|
|
51471
51319
|
if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) {
|
|
@@ -60382,22 +60230,15 @@ function createTypeChecker(host) {
|
|
|
60382
60230
|
}
|
|
60383
60231
|
}
|
|
60384
60232
|
if (isInJSFile(decl) && decl.jsDoc) {
|
|
60385
|
-
|
|
60386
|
-
|
|
60387
|
-
|
|
60388
|
-
|
|
60389
|
-
|
|
60390
|
-
|
|
60391
|
-
if (jsDocSignature.type === void 0 && !isConstructorDeclaration(decl)) {
|
|
60392
|
-
reportImplicitAny(jsDocSignature, anyType);
|
|
60393
|
-
}
|
|
60394
|
-
result.push(getSignatureFromDeclaration(jsDocSignature));
|
|
60395
|
-
hasJSDocOverloads = true;
|
|
60396
|
-
}
|
|
60233
|
+
const tags = getJSDocOverloadTags(decl);
|
|
60234
|
+
if (length(tags)) {
|
|
60235
|
+
for (const tag of tags) {
|
|
60236
|
+
const jsDocSignature = tag.typeExpression;
|
|
60237
|
+
if (jsDocSignature.type === void 0 && !isConstructorDeclaration(decl)) {
|
|
60238
|
+
reportImplicitAny(jsDocSignature, anyType);
|
|
60397
60239
|
}
|
|
60240
|
+
result.push(getSignatureFromDeclaration(jsDocSignature));
|
|
60398
60241
|
}
|
|
60399
|
-
}
|
|
60400
|
-
if (hasJSDocOverloads) {
|
|
60401
60242
|
continue;
|
|
60402
60243
|
}
|
|
60403
60244
|
}
|
|
@@ -81548,15 +81389,7 @@ function createTypeChecker(host) {
|
|
|
81548
81389
|
}
|
|
81549
81390
|
}
|
|
81550
81391
|
if (isInJSFile(current) && isFunctionLike(current) && current.jsDoc) {
|
|
81551
|
-
|
|
81552
|
-
if (node2.tags) {
|
|
81553
|
-
for (const tag of node2.tags) {
|
|
81554
|
-
if (isJSDocOverloadTag(tag)) {
|
|
81555
|
-
hasOverloads = true;
|
|
81556
|
-
}
|
|
81557
|
-
}
|
|
81558
|
-
}
|
|
81559
|
-
}
|
|
81392
|
+
hasOverloads = length(getJSDocOverloadTags(current)) > 0;
|
|
81560
81393
|
}
|
|
81561
81394
|
}
|
|
81562
81395
|
}
|
|
@@ -112410,7 +112243,7 @@ function transformECMAScriptModule(context) {
|
|
|
112410
112243
|
return node.isExportEquals ? void 0 : node;
|
|
112411
112244
|
}
|
|
112412
112245
|
function visitExportDeclaration(node) {
|
|
112413
|
-
if (
|
|
112246
|
+
if (compilerOptions.module !== void 0 && compilerOptions.module > 5 /* ES2015 */) {
|
|
112414
112247
|
return node;
|
|
112415
112248
|
}
|
|
112416
112249
|
if (!node.exportClause || !isNamespaceExport(node.exportClause) || !node.moduleSpecifier) {
|
|
@@ -121654,25 +121487,20 @@ function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, optio
|
|
|
121654
121487
|
return typeof result === "object" ? result.impliedNodeFormat : result;
|
|
121655
121488
|
}
|
|
121656
121489
|
function getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) {
|
|
121657
|
-
|
|
121658
|
-
|
|
121659
|
-
case
|
|
121660
|
-
|
|
121661
|
-
case 199 /* NodeNext */:
|
|
121662
|
-
case 2 /* DefaultModule */:
|
|
121663
|
-
case 3 /* DefaultCommonJS */:
|
|
121664
|
-
const defaultFormat = formatDetection === 1 /* Bundler */ ? void 0 : formatDetection === 2 /* DefaultModule */ ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
121665
|
-
return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson(defaultFormat) : void 0;
|
|
121490
|
+
switch (getEmitModuleResolutionKind(options)) {
|
|
121491
|
+
case 3 /* Node16 */:
|
|
121492
|
+
case 99 /* NodeNext */:
|
|
121493
|
+
return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0;
|
|
121666
121494
|
default:
|
|
121667
121495
|
return void 0;
|
|
121668
121496
|
}
|
|
121669
|
-
function lookupFromPackageJson(
|
|
121497
|
+
function lookupFromPackageJson() {
|
|
121670
121498
|
const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options);
|
|
121671
121499
|
const packageJsonLocations = [];
|
|
121672
121500
|
state.failedLookupLocations = packageJsonLocations;
|
|
121673
121501
|
state.affectingLocations = packageJsonLocations;
|
|
121674
121502
|
const packageJsonScope = getPackageScopeForPath(fileName, state);
|
|
121675
|
-
const impliedNodeFormat = (packageJsonScope == null ? void 0 : packageJsonScope.contents.packageJsonContent.type) === "module" ? 99 /* ESNext */ :
|
|
121503
|
+
const impliedNodeFormat = (packageJsonScope == null ? void 0 : packageJsonScope.contents.packageJsonContent.type) === "module" ? 99 /* ESNext */ : 1 /* CommonJS */;
|
|
121676
121504
|
return { impliedNodeFormat, packageJsonLocations, packageJsonScope };
|
|
121677
121505
|
}
|
|
121678
121506
|
}
|
|
@@ -134135,7 +133963,7 @@ function getContextualTypeFromParent(node, checker, contextFlags) {
|
|
|
134135
133963
|
function quote(sourceFile, preferences, text) {
|
|
134136
133964
|
const quotePreference = getQuotePreference(sourceFile, preferences);
|
|
134137
133965
|
const quoted = JSON.stringify(text);
|
|
134138
|
-
return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"')}'` : quoted;
|
|
133966
|
+
return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, () => "\\'").replace(/\\"/g, '"')}'` : quoted;
|
|
134139
133967
|
}
|
|
134140
133968
|
function isEqualityOperatorKind(kind) {
|
|
134141
133969
|
switch (kind) {
|
|
@@ -167796,16 +167624,16 @@ function getRenameInfoForModule(node, sourceFile, moduleSymbol) {
|
|
|
167796
167624
|
if (!moduleSourceFile)
|
|
167797
167625
|
return void 0;
|
|
167798
167626
|
const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
|
|
167799
|
-
const
|
|
167627
|
+
const fileName = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
|
|
167800
167628
|
const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */;
|
|
167801
167629
|
const indexAfterLastSlash = node.text.lastIndexOf("/") + 1;
|
|
167802
167630
|
const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);
|
|
167803
167631
|
return {
|
|
167804
167632
|
canRename: true,
|
|
167805
|
-
fileToRename:
|
|
167633
|
+
fileToRename: fileName,
|
|
167806
167634
|
kind,
|
|
167807
|
-
displayName:
|
|
167808
|
-
fullDisplayName:
|
|
167635
|
+
displayName: fileName,
|
|
167636
|
+
fullDisplayName: node.text,
|
|
167809
167637
|
kindModifiers: "" /* none */,
|
|
167810
167638
|
triggerSpan
|
|
167811
167639
|
};
|
|
@@ -173409,8 +173237,6 @@ __export(ts_exports2, {
|
|
|
173409
173237
|
MemberOverrideStatus: () => MemberOverrideStatus,
|
|
173410
173238
|
ModifierFlags: () => ModifierFlags,
|
|
173411
173239
|
ModuleDetectionKind: () => ModuleDetectionKind,
|
|
173412
|
-
ModuleFormatDetectionKind: () => ModuleFormatDetectionKind,
|
|
173413
|
-
ModuleFormatInteropKind: () => ModuleFormatInteropKind,
|
|
173414
173240
|
ModuleInstanceState: () => ModuleInstanceState,
|
|
173415
173241
|
ModuleKind: () => ModuleKind,
|
|
173416
173242
|
ModuleResolutionKind: () => ModuleResolutionKind,
|
|
@@ -174118,6 +173944,7 @@ __export(ts_exports2, {
|
|
|
174118
173944
|
getJSDocEnumTag: () => getJSDocEnumTag,
|
|
174119
173945
|
getJSDocHost: () => getJSDocHost,
|
|
174120
173946
|
getJSDocImplementsTags: () => getJSDocImplementsTags,
|
|
173947
|
+
getJSDocOverloadTags: () => getJSDocOverloadTags,
|
|
174121
173948
|
getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache,
|
|
174122
173949
|
getJSDocParameterTags: () => getJSDocParameterTags,
|
|
174123
173950
|
getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache,
|
|
@@ -174185,11 +174012,8 @@ __export(ts_exports2, {
|
|
|
174185
174012
|
getModeForUsageLocation: () => getModeForUsageLocation,
|
|
174186
174013
|
getModifiedTime: () => getModifiedTime,
|
|
174187
174014
|
getModifiers: () => getModifiers,
|
|
174188
|
-
getModuleFormatDetectionKind: () => getModuleFormatDetectionKind,
|
|
174189
|
-
getModuleFormatInteropKind: () => getModuleFormatInteropKind,
|
|
174190
174015
|
getModuleInstanceState: () => getModuleInstanceState,
|
|
174191
174016
|
getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt,
|
|
174192
|
-
getModulePreset: () => getModulePreset,
|
|
174193
174017
|
getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference,
|
|
174194
174018
|
getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost,
|
|
174195
174019
|
getNameForExportedSymbol: () => getNameForExportedSymbol,
|
|
@@ -175351,6 +175175,7 @@ __export(ts_exports2, {
|
|
|
175351
175175
|
removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator,
|
|
175352
175176
|
repeatString: () => repeatString,
|
|
175353
175177
|
replaceElement: () => replaceElement,
|
|
175178
|
+
replaceFirstStar: () => replaceFirstStar,
|
|
175354
175179
|
resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson,
|
|
175355
175180
|
resolveConfigFileProjectName: () => resolveConfigFileProjectName,
|
|
175356
175181
|
resolveJSModule: () => resolveJSModule,
|
|
@@ -179650,8 +179475,8 @@ var ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*";
|
|
|
179650
179475
|
function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) {
|
|
179651
179476
|
const map2 = /* @__PURE__ */ new Map();
|
|
179652
179477
|
for (const option of commandLineOptions) {
|
|
179653
|
-
|
|
179654
|
-
|
|
179478
|
+
if (typeof option.type === "object") {
|
|
179479
|
+
const optionMap = option.type;
|
|
179655
179480
|
optionMap.forEach((value) => {
|
|
179656
179481
|
Debug.assert(typeof value === "number");
|
|
179657
179482
|
});
|
|
@@ -188206,8 +188031,6 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188206
188031
|
MemberOverrideStatus,
|
|
188207
188032
|
ModifierFlags,
|
|
188208
188033
|
ModuleDetectionKind,
|
|
188209
|
-
ModuleFormatDetectionKind,
|
|
188210
|
-
ModuleFormatInteropKind,
|
|
188211
188034
|
ModuleInstanceState,
|
|
188212
188035
|
ModuleKind,
|
|
188213
188036
|
ModuleResolutionKind,
|
|
@@ -188915,6 +188738,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188915
188738
|
getJSDocEnumTag,
|
|
188916
188739
|
getJSDocHost,
|
|
188917
188740
|
getJSDocImplementsTags,
|
|
188741
|
+
getJSDocOverloadTags,
|
|
188918
188742
|
getJSDocOverrideTagNoCache,
|
|
188919
188743
|
getJSDocParameterTags,
|
|
188920
188744
|
getJSDocParameterTagsNoCache,
|
|
@@ -188982,11 +188806,8 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
188982
188806
|
getModeForUsageLocation,
|
|
188983
188807
|
getModifiedTime,
|
|
188984
188808
|
getModifiers,
|
|
188985
|
-
getModuleFormatDetectionKind,
|
|
188986
|
-
getModuleFormatInteropKind,
|
|
188987
188809
|
getModuleInstanceState,
|
|
188988
188810
|
getModuleNameStringLiteralAt,
|
|
188989
|
-
getModulePreset,
|
|
188990
188811
|
getModuleSpecifierEndingPreference,
|
|
188991
188812
|
getModuleSpecifierResolverHost,
|
|
188992
188813
|
getNameForExportedSymbol,
|
|
@@ -190148,6 +189969,7 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
190148
189969
|
removeTrailingDirectorySeparator,
|
|
190149
189970
|
repeatString,
|
|
190150
189971
|
replaceElement,
|
|
189972
|
+
replaceFirstStar,
|
|
190151
189973
|
resolutionExtensionIsTSOrJson,
|
|
190152
189974
|
resolveConfigFileProjectName,
|
|
190153
189975
|
resolveJSModule,
|