@typescript-deploys/pr-build 5.4.0-pr-56434-11 → 5.4.0-pr-56458-11
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 +51 -34
- package/lib/tsserver.js +67 -19
- package/lib/typescript.js +67 -19
- package/lib/typingsInstaller.js +5 -18
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20231120`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -972,23 +972,6 @@ function compareStringsCaseSensitive(a, b) {
|
|
|
972
972
|
function getStringComparer(ignoreCase) {
|
|
973
973
|
return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
|
|
974
974
|
}
|
|
975
|
-
var createUIStringComparer = (() => {
|
|
976
|
-
return createIntlCollatorStringComparer;
|
|
977
|
-
function compareWithCallback(a, b, comparer) {
|
|
978
|
-
if (a === b)
|
|
979
|
-
return 0 /* EqualTo */;
|
|
980
|
-
if (a === void 0)
|
|
981
|
-
return -1 /* LessThan */;
|
|
982
|
-
if (b === void 0)
|
|
983
|
-
return 1 /* GreaterThan */;
|
|
984
|
-
const value = comparer(a, b);
|
|
985
|
-
return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
|
|
986
|
-
}
|
|
987
|
-
function createIntlCollatorStringComparer(locale) {
|
|
988
|
-
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
|
|
989
|
-
return (a, b) => compareWithCallback(a, b, comparer);
|
|
990
|
-
}
|
|
991
|
-
})();
|
|
992
975
|
var uiComparerCaseSensitive;
|
|
993
976
|
var uiLocale;
|
|
994
977
|
function setUILocale(value) {
|
|
@@ -5952,6 +5935,10 @@ var Diagnostics = {
|
|
|
5952
5935
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5953
5936
|
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5954
5937
|
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
5938
|
+
_0_resolves_to_a_type_only_declaration_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(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
5939
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
5940
|
+
_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 /* Error */, "_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."),
|
|
5941
|
+
_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 /* Error */, "_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 }'."),
|
|
5955
5942
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5956
5943
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "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."),
|
|
5957
5944
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "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."),
|
|
@@ -57594,7 +57581,7 @@ function createTypeChecker(host) {
|
|
|
57594
57581
|
return type;
|
|
57595
57582
|
function addSpans(texts2, types2) {
|
|
57596
57583
|
for (let i = 0; i < types2.length; i++) {
|
|
57597
|
-
const t = types2[i];
|
|
57584
|
+
const t = stripObjectTypeTags(types2[i]);
|
|
57598
57585
|
if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) {
|
|
57599
57586
|
text += getTemplateStringForType(t) || "";
|
|
57600
57587
|
text += texts2[i + 1];
|
|
@@ -57614,6 +57601,15 @@ function createTypeChecker(host) {
|
|
|
57614
57601
|
return true;
|
|
57615
57602
|
}
|
|
57616
57603
|
}
|
|
57604
|
+
function stripObjectTypeTags(type) {
|
|
57605
|
+
if (type.flags & 2097152 /* Intersection */) {
|
|
57606
|
+
const nonObjectTypes = filter(type.types, (t) => !(t.flags & 524288 /* Object */));
|
|
57607
|
+
if (nonObjectTypes !== type.types) {
|
|
57608
|
+
return getIntersectionType(nonObjectTypes);
|
|
57609
|
+
}
|
|
57610
|
+
}
|
|
57611
|
+
return type;
|
|
57612
|
+
}
|
|
57617
57613
|
function getTemplateStringForType(type) {
|
|
57618
57614
|
return type.flags & 128 /* StringLiteral */ ? type.value : type.flags & 256 /* NumberLiteral */ ? "" + type.value : type.flags & 2048 /* BigIntLiteral */ ? pseudoBigIntToString(type.value) : type.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) ? type.intrinsicName : void 0;
|
|
57619
57615
|
}
|
|
@@ -57912,18 +57908,7 @@ function createTypeChecker(host) {
|
|
|
57912
57908
|
return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode;
|
|
57913
57909
|
}
|
|
57914
57910
|
function isPatternLiteralPlaceholderType(type) {
|
|
57915
|
-
|
|
57916
|
-
let seenPlaceholder = false;
|
|
57917
|
-
for (const t of type.types) {
|
|
57918
|
-
if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
|
|
57919
|
-
seenPlaceholder = true;
|
|
57920
|
-
} else if (!(t.flags & 524288 /* Object */)) {
|
|
57921
|
-
return false;
|
|
57922
|
-
}
|
|
57923
|
-
}
|
|
57924
|
-
return seenPlaceholder;
|
|
57925
|
-
}
|
|
57926
|
-
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
57911
|
+
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || isPatternLiteralType(type) || type.flags & 2097152 /* Intersection */ && every(type.types, isPatternLiteralType));
|
|
57927
57912
|
}
|
|
57928
57913
|
function isPatternLiteralType(type) {
|
|
57929
57914
|
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
@@ -80666,10 +80651,11 @@ function createTypeChecker(host) {
|
|
|
80666
80651
|
node
|
|
80667
80652
|
));
|
|
80668
80653
|
if (sym) {
|
|
80654
|
+
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(sym, 111551 /* Value */);
|
|
80669
80655
|
markAliasReferenced(sym, id);
|
|
80670
80656
|
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
80671
80657
|
checkExpressionCached(id);
|
|
80672
|
-
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax &&
|
|
80658
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && typeOnlyDeclaration) {
|
|
80673
80659
|
error(
|
|
80674
80660
|
id,
|
|
80675
80661
|
node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,
|
|
@@ -80683,6 +80669,33 @@ function createTypeChecker(host) {
|
|
|
80683
80669
|
idText(id)
|
|
80684
80670
|
);
|
|
80685
80671
|
}
|
|
80672
|
+
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
80673
|
+
if (sym.flags & 2097152 /* Alias */ && resolveAlias(sym) !== unknownSymbol && getSymbolFlags(
|
|
80674
|
+
sym,
|
|
80675
|
+
/*excludeTypeOnlyMeanings*/
|
|
80676
|
+
false,
|
|
80677
|
+
/*excludeLocalMeanings*/
|
|
80678
|
+
true
|
|
80679
|
+
) & 788968 /* Type */ && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
80680
|
+
error(
|
|
80681
|
+
id,
|
|
80682
|
+
node.isExportEquals ? Diagnostics._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 : Diagnostics._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,
|
|
80683
|
+
idText(id),
|
|
80684
|
+
isolatedModulesLikeFlagName
|
|
80685
|
+
);
|
|
80686
|
+
} else if (typeOnlyDeclaration && getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node)) {
|
|
80687
|
+
addTypeOnlyDeclarationRelatedInfo(
|
|
80688
|
+
error(
|
|
80689
|
+
id,
|
|
80690
|
+
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
|
80691
|
+
idText(id),
|
|
80692
|
+
isolatedModulesLikeFlagName
|
|
80693
|
+
),
|
|
80694
|
+
typeOnlyDeclaration,
|
|
80695
|
+
idText(id)
|
|
80696
|
+
);
|
|
80697
|
+
}
|
|
80698
|
+
}
|
|
80686
80699
|
} else {
|
|
80687
80700
|
checkExpressionCached(id);
|
|
80688
80701
|
}
|
|
@@ -82077,7 +82090,11 @@ function createTypeChecker(host) {
|
|
|
82077
82090
|
const exportClause = node.exportClause;
|
|
82078
82091
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
82079
82092
|
case 277 /* ExportAssignment */:
|
|
82080
|
-
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
82093
|
+
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
82094
|
+
getSymbolOfDeclaration(node),
|
|
82095
|
+
/*excludeTypeOnlyValues*/
|
|
82096
|
+
true
|
|
82097
|
+
) : true;
|
|
82081
82098
|
}
|
|
82082
82099
|
return false;
|
|
82083
82100
|
}
|
|
@@ -82095,7 +82112,7 @@ function createTypeChecker(host) {
|
|
|
82095
82112
|
}
|
|
82096
82113
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
82097
82114
|
if (target === unknownSymbol) {
|
|
82098
|
-
return
|
|
82115
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
82099
82116
|
}
|
|
82100
82117
|
return !!(getSymbolFlags(
|
|
82101
82118
|
symbol,
|
package/lib/tsserver.js
CHANGED
|
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2330
2330
|
|
|
2331
2331
|
// src/compiler/corePublic.ts
|
|
2332
2332
|
var versionMajorMinor = "5.4";
|
|
2333
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2333
|
+
var version = `${versionMajorMinor}.0-insiders.20231120`;
|
|
2334
2334
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2335
2335
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2336
2336
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3624,7 +3624,7 @@ function compareStringsCaseSensitive(a, b) {
|
|
|
3624
3624
|
function getStringComparer(ignoreCase) {
|
|
3625
3625
|
return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
|
|
3626
3626
|
}
|
|
3627
|
-
var createUIStringComparer = (() => {
|
|
3627
|
+
var createUIStringComparer = /* @__PURE__ */ (() => {
|
|
3628
3628
|
return createIntlCollatorStringComparer;
|
|
3629
3629
|
function compareWithCallback(a, b, comparer) {
|
|
3630
3630
|
if (a === b)
|
|
@@ -9484,6 +9484,10 @@ var Diagnostics = {
|
|
|
9484
9484
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
9485
9485
|
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
9486
9486
|
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
9487
|
+
_0_resolves_to_a_type_only_declaration_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(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
9488
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
9489
|
+
_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 /* Error */, "_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."),
|
|
9490
|
+
_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 /* Error */, "_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 }'."),
|
|
9487
9491
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
9488
9492
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "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."),
|
|
9489
9493
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "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."),
|
|
@@ -62302,7 +62306,7 @@ function createTypeChecker(host) {
|
|
|
62302
62306
|
return type;
|
|
62303
62307
|
function addSpans(texts2, types2) {
|
|
62304
62308
|
for (let i = 0; i < types2.length; i++) {
|
|
62305
|
-
const t = types2[i];
|
|
62309
|
+
const t = stripObjectTypeTags(types2[i]);
|
|
62306
62310
|
if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) {
|
|
62307
62311
|
text += getTemplateStringForType(t) || "";
|
|
62308
62312
|
text += texts2[i + 1];
|
|
@@ -62322,6 +62326,15 @@ function createTypeChecker(host) {
|
|
|
62322
62326
|
return true;
|
|
62323
62327
|
}
|
|
62324
62328
|
}
|
|
62329
|
+
function stripObjectTypeTags(type) {
|
|
62330
|
+
if (type.flags & 2097152 /* Intersection */) {
|
|
62331
|
+
const nonObjectTypes = filter(type.types, (t) => !(t.flags & 524288 /* Object */));
|
|
62332
|
+
if (nonObjectTypes !== type.types) {
|
|
62333
|
+
return getIntersectionType(nonObjectTypes);
|
|
62334
|
+
}
|
|
62335
|
+
}
|
|
62336
|
+
return type;
|
|
62337
|
+
}
|
|
62325
62338
|
function getTemplateStringForType(type) {
|
|
62326
62339
|
return type.flags & 128 /* StringLiteral */ ? type.value : type.flags & 256 /* NumberLiteral */ ? "" + type.value : type.flags & 2048 /* BigIntLiteral */ ? pseudoBigIntToString(type.value) : type.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) ? type.intrinsicName : void 0;
|
|
62327
62340
|
}
|
|
@@ -62620,18 +62633,7 @@ function createTypeChecker(host) {
|
|
|
62620
62633
|
return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode;
|
|
62621
62634
|
}
|
|
62622
62635
|
function isPatternLiteralPlaceholderType(type) {
|
|
62623
|
-
|
|
62624
|
-
let seenPlaceholder = false;
|
|
62625
|
-
for (const t of type.types) {
|
|
62626
|
-
if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
|
|
62627
|
-
seenPlaceholder = true;
|
|
62628
|
-
} else if (!(t.flags & 524288 /* Object */)) {
|
|
62629
|
-
return false;
|
|
62630
|
-
}
|
|
62631
|
-
}
|
|
62632
|
-
return seenPlaceholder;
|
|
62633
|
-
}
|
|
62634
|
-
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
62636
|
+
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || isPatternLiteralType(type) || type.flags & 2097152 /* Intersection */ && every(type.types, isPatternLiteralType));
|
|
62635
62637
|
}
|
|
62636
62638
|
function isPatternLiteralType(type) {
|
|
62637
62639
|
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
@@ -85374,10 +85376,11 @@ function createTypeChecker(host) {
|
|
|
85374
85376
|
node
|
|
85375
85377
|
));
|
|
85376
85378
|
if (sym) {
|
|
85379
|
+
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(sym, 111551 /* Value */);
|
|
85377
85380
|
markAliasReferenced(sym, id);
|
|
85378
85381
|
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
85379
85382
|
checkExpressionCached(id);
|
|
85380
|
-
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax &&
|
|
85383
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && typeOnlyDeclaration) {
|
|
85381
85384
|
error2(
|
|
85382
85385
|
id,
|
|
85383
85386
|
node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,
|
|
@@ -85391,6 +85394,33 @@ function createTypeChecker(host) {
|
|
|
85391
85394
|
idText(id)
|
|
85392
85395
|
);
|
|
85393
85396
|
}
|
|
85397
|
+
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
85398
|
+
if (sym.flags & 2097152 /* Alias */ && resolveAlias(sym) !== unknownSymbol && getSymbolFlags(
|
|
85399
|
+
sym,
|
|
85400
|
+
/*excludeTypeOnlyMeanings*/
|
|
85401
|
+
false,
|
|
85402
|
+
/*excludeLocalMeanings*/
|
|
85403
|
+
true
|
|
85404
|
+
) & 788968 /* Type */ && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
85405
|
+
error2(
|
|
85406
|
+
id,
|
|
85407
|
+
node.isExportEquals ? Diagnostics._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 : Diagnostics._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,
|
|
85408
|
+
idText(id),
|
|
85409
|
+
isolatedModulesLikeFlagName
|
|
85410
|
+
);
|
|
85411
|
+
} else if (typeOnlyDeclaration && getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node)) {
|
|
85412
|
+
addTypeOnlyDeclarationRelatedInfo(
|
|
85413
|
+
error2(
|
|
85414
|
+
id,
|
|
85415
|
+
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
|
85416
|
+
idText(id),
|
|
85417
|
+
isolatedModulesLikeFlagName
|
|
85418
|
+
),
|
|
85419
|
+
typeOnlyDeclaration,
|
|
85420
|
+
idText(id)
|
|
85421
|
+
);
|
|
85422
|
+
}
|
|
85423
|
+
}
|
|
85394
85424
|
} else {
|
|
85395
85425
|
checkExpressionCached(id);
|
|
85396
85426
|
}
|
|
@@ -86785,7 +86815,11 @@ function createTypeChecker(host) {
|
|
|
86785
86815
|
const exportClause = node.exportClause;
|
|
86786
86816
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
86787
86817
|
case 277 /* ExportAssignment */:
|
|
86788
|
-
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
86818
|
+
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
86819
|
+
getSymbolOfDeclaration(node),
|
|
86820
|
+
/*excludeTypeOnlyValues*/
|
|
86821
|
+
true
|
|
86822
|
+
) : true;
|
|
86789
86823
|
}
|
|
86790
86824
|
return false;
|
|
86791
86825
|
}
|
|
@@ -86803,7 +86837,7 @@ function createTypeChecker(host) {
|
|
|
86803
86837
|
}
|
|
86804
86838
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
86805
86839
|
if (target === unknownSymbol) {
|
|
86806
|
-
return
|
|
86840
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
86807
86841
|
}
|
|
86808
86842
|
return !!(getSymbolFlags(
|
|
86809
86843
|
symbol,
|
|
@@ -133429,7 +133463,8 @@ function buildLinkParts(link, checker) {
|
|
|
133429
133463
|
if (text)
|
|
133430
133464
|
parts.push(linkTextPart(text));
|
|
133431
133465
|
} else {
|
|
133432
|
-
|
|
133466
|
+
const separator = suffix === 0 || link.text.charCodeAt(suffix) === 124 /* bar */ && name.charCodeAt(name.length - 1) !== 32 /* space */ ? " " : "";
|
|
133467
|
+
parts.push(linkTextPart(name + separator + text));
|
|
133433
133468
|
}
|
|
133434
133469
|
}
|
|
133435
133470
|
parts.push(linkPart("}"));
|
|
@@ -163900,6 +163935,10 @@ var Core;
|
|
|
163900
163935
|
getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere);
|
|
163901
163936
|
return;
|
|
163902
163937
|
}
|
|
163938
|
+
if (isJSDocPropertyLikeTag(parent2) && parent2.isNameFirst && parent2.typeExpression && isJSDocTypeLiteral(parent2.typeExpression.type) && parent2.typeExpression.type.jsDocPropertyTags && length(parent2.typeExpression.type.jsDocPropertyTags)) {
|
|
163939
|
+
getReferencesAtJSDocTypeLiteral(parent2.typeExpression.type.jsDocPropertyTags, referenceLocation, search, state);
|
|
163940
|
+
return;
|
|
163941
|
+
}
|
|
163903
163942
|
const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
|
|
163904
163943
|
if (!relatedSymbol) {
|
|
163905
163944
|
getReferenceForShorthandProperty(referenceSymbol, search, state);
|
|
@@ -163926,6 +163965,15 @@ var Core;
|
|
|
163926
163965
|
}
|
|
163927
163966
|
getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
|
|
163928
163967
|
}
|
|
163968
|
+
function getReferencesAtJSDocTypeLiteral(jsDocPropertyTags, referenceLocation, search, state) {
|
|
163969
|
+
const addRef = state.referenceAdder(search.symbol);
|
|
163970
|
+
addReference(referenceLocation, search.symbol, state);
|
|
163971
|
+
forEach(jsDocPropertyTags, (propTag) => {
|
|
163972
|
+
if (isQualifiedName(propTag.name)) {
|
|
163973
|
+
addRef(propTag.name.left);
|
|
163974
|
+
}
|
|
163975
|
+
});
|
|
163976
|
+
}
|
|
163929
163977
|
function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) {
|
|
163930
163978
|
Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled");
|
|
163931
163979
|
const { parent: parent2, propertyName, name } = exportSpecifier;
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20231120`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -1636,7 +1636,7 @@ var ts = (() => {
|
|
|
1636
1636
|
AssertionLevel2[AssertionLevel2["VeryAggressive"] = 3] = "VeryAggressive";
|
|
1637
1637
|
return AssertionLevel2;
|
|
1638
1638
|
})(AssertionLevel || {});
|
|
1639
|
-
createUIStringComparer = (() => {
|
|
1639
|
+
createUIStringComparer = /* @__PURE__ */ (() => {
|
|
1640
1640
|
return createIntlCollatorStringComparer;
|
|
1641
1641
|
function compareWithCallback(a, b, comparer) {
|
|
1642
1642
|
if (a === b)
|
|
@@ -7264,6 +7264,10 @@ ${lanes.join("\n")}
|
|
|
7264
7264
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
7265
7265
|
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
7266
7266
|
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
7267
|
+
_0_resolves_to_a_type_only_declaration_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(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
7268
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
7269
|
+
_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 /* Error */, "_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."),
|
|
7270
|
+
_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 /* Error */, "_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 }'."),
|
|
7267
7271
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
7268
7272
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "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."),
|
|
7269
7273
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "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."),
|
|
@@ -60067,7 +60071,7 @@ ${lanes.join("\n")}
|
|
|
60067
60071
|
return type;
|
|
60068
60072
|
function addSpans(texts2, types2) {
|
|
60069
60073
|
for (let i = 0; i < types2.length; i++) {
|
|
60070
|
-
const t = types2[i];
|
|
60074
|
+
const t = stripObjectTypeTags(types2[i]);
|
|
60071
60075
|
if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) {
|
|
60072
60076
|
text += getTemplateStringForType(t) || "";
|
|
60073
60077
|
text += texts2[i + 1];
|
|
@@ -60087,6 +60091,15 @@ ${lanes.join("\n")}
|
|
|
60087
60091
|
return true;
|
|
60088
60092
|
}
|
|
60089
60093
|
}
|
|
60094
|
+
function stripObjectTypeTags(type) {
|
|
60095
|
+
if (type.flags & 2097152 /* Intersection */) {
|
|
60096
|
+
const nonObjectTypes = filter(type.types, (t) => !(t.flags & 524288 /* Object */));
|
|
60097
|
+
if (nonObjectTypes !== type.types) {
|
|
60098
|
+
return getIntersectionType(nonObjectTypes);
|
|
60099
|
+
}
|
|
60100
|
+
}
|
|
60101
|
+
return type;
|
|
60102
|
+
}
|
|
60090
60103
|
function getTemplateStringForType(type) {
|
|
60091
60104
|
return type.flags & 128 /* StringLiteral */ ? type.value : type.flags & 256 /* NumberLiteral */ ? "" + type.value : type.flags & 2048 /* BigIntLiteral */ ? pseudoBigIntToString(type.value) : type.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) ? type.intrinsicName : void 0;
|
|
60092
60105
|
}
|
|
@@ -60385,18 +60398,7 @@ ${lanes.join("\n")}
|
|
|
60385
60398
|
return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode;
|
|
60386
60399
|
}
|
|
60387
60400
|
function isPatternLiteralPlaceholderType(type) {
|
|
60388
|
-
|
|
60389
|
-
let seenPlaceholder = false;
|
|
60390
|
-
for (const t of type.types) {
|
|
60391
|
-
if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
|
|
60392
|
-
seenPlaceholder = true;
|
|
60393
|
-
} else if (!(t.flags & 524288 /* Object */)) {
|
|
60394
|
-
return false;
|
|
60395
|
-
}
|
|
60396
|
-
}
|
|
60397
|
-
return seenPlaceholder;
|
|
60398
|
-
}
|
|
60399
|
-
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
|
|
60401
|
+
return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || isPatternLiteralType(type) || type.flags & 2097152 /* Intersection */ && every(type.types, isPatternLiteralType));
|
|
60400
60402
|
}
|
|
60401
60403
|
function isPatternLiteralType(type) {
|
|
60402
60404
|
return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type);
|
|
@@ -83139,10 +83141,11 @@ ${lanes.join("\n")}
|
|
|
83139
83141
|
node
|
|
83140
83142
|
));
|
|
83141
83143
|
if (sym) {
|
|
83144
|
+
const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(sym, 111551 /* Value */);
|
|
83142
83145
|
markAliasReferenced(sym, id);
|
|
83143
83146
|
if (getSymbolFlags(sym) & 111551 /* Value */) {
|
|
83144
83147
|
checkExpressionCached(id);
|
|
83145
|
-
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax &&
|
|
83148
|
+
if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && typeOnlyDeclaration) {
|
|
83146
83149
|
error2(
|
|
83147
83150
|
id,
|
|
83148
83151
|
node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration,
|
|
@@ -83156,6 +83159,33 @@ ${lanes.join("\n")}
|
|
|
83156
83159
|
idText(id)
|
|
83157
83160
|
);
|
|
83158
83161
|
}
|
|
83162
|
+
if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
|
|
83163
|
+
if (sym.flags & 2097152 /* Alias */ && resolveAlias(sym) !== unknownSymbol && getSymbolFlags(
|
|
83164
|
+
sym,
|
|
83165
|
+
/*excludeTypeOnlyMeanings*/
|
|
83166
|
+
false,
|
|
83167
|
+
/*excludeLocalMeanings*/
|
|
83168
|
+
true
|
|
83169
|
+
) & 788968 /* Type */ && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
|
|
83170
|
+
error2(
|
|
83171
|
+
id,
|
|
83172
|
+
node.isExportEquals ? Diagnostics._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 : Diagnostics._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,
|
|
83173
|
+
idText(id),
|
|
83174
|
+
isolatedModulesLikeFlagName
|
|
83175
|
+
);
|
|
83176
|
+
} else if (typeOnlyDeclaration && getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node)) {
|
|
83177
|
+
addTypeOnlyDeclarationRelatedInfo(
|
|
83178
|
+
error2(
|
|
83179
|
+
id,
|
|
83180
|
+
node.isExportEquals ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
|
|
83181
|
+
idText(id),
|
|
83182
|
+
isolatedModulesLikeFlagName
|
|
83183
|
+
),
|
|
83184
|
+
typeOnlyDeclaration,
|
|
83185
|
+
idText(id)
|
|
83186
|
+
);
|
|
83187
|
+
}
|
|
83188
|
+
}
|
|
83159
83189
|
} else {
|
|
83160
83190
|
checkExpressionCached(id);
|
|
83161
83191
|
}
|
|
@@ -84550,7 +84580,11 @@ ${lanes.join("\n")}
|
|
|
84550
84580
|
const exportClause = node.exportClause;
|
|
84551
84581
|
return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration));
|
|
84552
84582
|
case 277 /* ExportAssignment */:
|
|
84553
|
-
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
84583
|
+
return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(
|
|
84584
|
+
getSymbolOfDeclaration(node),
|
|
84585
|
+
/*excludeTypeOnlyValues*/
|
|
84586
|
+
true
|
|
84587
|
+
) : true;
|
|
84554
84588
|
}
|
|
84555
84589
|
return false;
|
|
84556
84590
|
}
|
|
@@ -84568,7 +84602,7 @@ ${lanes.join("\n")}
|
|
|
84568
84602
|
}
|
|
84569
84603
|
const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol));
|
|
84570
84604
|
if (target === unknownSymbol) {
|
|
84571
|
-
return
|
|
84605
|
+
return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol);
|
|
84572
84606
|
}
|
|
84573
84607
|
return !!(getSymbolFlags(
|
|
84574
84608
|
symbol,
|
|
@@ -131693,7 +131727,8 @@ ${lanes.join("\n")}
|
|
|
131693
131727
|
if (text)
|
|
131694
131728
|
parts.push(linkTextPart(text));
|
|
131695
131729
|
} else {
|
|
131696
|
-
|
|
131730
|
+
const separator = suffix === 0 || link.text.charCodeAt(suffix) === 124 /* bar */ && name.charCodeAt(name.length - 1) !== 32 /* space */ ? " " : "";
|
|
131731
|
+
parts.push(linkTextPart(name + separator + text));
|
|
131697
131732
|
}
|
|
131698
131733
|
}
|
|
131699
131734
|
parts.push(linkPart("}"));
|
|
@@ -163202,6 +163237,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163202
163237
|
getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere);
|
|
163203
163238
|
return;
|
|
163204
163239
|
}
|
|
163240
|
+
if (isJSDocPropertyLikeTag(parent2) && parent2.isNameFirst && parent2.typeExpression && isJSDocTypeLiteral(parent2.typeExpression.type) && parent2.typeExpression.type.jsDocPropertyTags && length(parent2.typeExpression.type.jsDocPropertyTags)) {
|
|
163241
|
+
getReferencesAtJSDocTypeLiteral(parent2.typeExpression.type.jsDocPropertyTags, referenceLocation, search, state);
|
|
163242
|
+
return;
|
|
163243
|
+
}
|
|
163205
163244
|
const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state);
|
|
163206
163245
|
if (!relatedSymbol) {
|
|
163207
163246
|
getReferenceForShorthandProperty(referenceSymbol, search, state);
|
|
@@ -163228,6 +163267,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163228
163267
|
}
|
|
163229
163268
|
getImportOrExportReferences(referenceLocation, referenceSymbol, search, state);
|
|
163230
163269
|
}
|
|
163270
|
+
function getReferencesAtJSDocTypeLiteral(jsDocPropertyTags, referenceLocation, search, state) {
|
|
163271
|
+
const addRef = state.referenceAdder(search.symbol);
|
|
163272
|
+
addReference(referenceLocation, search.symbol, state);
|
|
163273
|
+
forEach(jsDocPropertyTags, (propTag) => {
|
|
163274
|
+
if (isQualifiedName(propTag.name)) {
|
|
163275
|
+
addRef(propTag.name.left);
|
|
163276
|
+
}
|
|
163277
|
+
});
|
|
163278
|
+
}
|
|
163231
163279
|
function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) {
|
|
163232
163280
|
Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled");
|
|
163233
163281
|
const { parent: parent2, propertyName, name } = exportSpecifier;
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20231120`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -568,23 +568,6 @@ function compareStringsCaseSensitive(a, b) {
|
|
|
568
568
|
function getStringComparer(ignoreCase) {
|
|
569
569
|
return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive;
|
|
570
570
|
}
|
|
571
|
-
var createUIStringComparer = (() => {
|
|
572
|
-
return createIntlCollatorStringComparer;
|
|
573
|
-
function compareWithCallback(a, b, comparer) {
|
|
574
|
-
if (a === b)
|
|
575
|
-
return 0 /* EqualTo */;
|
|
576
|
-
if (a === void 0)
|
|
577
|
-
return -1 /* LessThan */;
|
|
578
|
-
if (b === void 0)
|
|
579
|
-
return 1 /* GreaterThan */;
|
|
580
|
-
const value = comparer(a, b);
|
|
581
|
-
return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */;
|
|
582
|
-
}
|
|
583
|
-
function createIntlCollatorStringComparer(locale) {
|
|
584
|
-
const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare;
|
|
585
|
-
return (a, b) => compareWithCallback(a, b, comparer);
|
|
586
|
-
}
|
|
587
|
-
})();
|
|
588
571
|
function getSpellingSuggestion(name, candidates, getName) {
|
|
589
572
|
const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34));
|
|
590
573
|
let bestDistance = Math.floor(name.length * 0.4) + 1;
|
|
@@ -5329,6 +5312,10 @@ var Diagnostics = {
|
|
|
5329
5312
|
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5330
5313
|
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
|
|
5331
5314
|
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
|
|
5315
|
+
_0_resolves_to_a_type_only_declaration_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(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
|
|
5316
|
+
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
|
|
5317
|
+
_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 /* Error */, "_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."),
|
|
5318
|
+
_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 /* Error */, "_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 }'."),
|
|
5332
5319
|
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
|
|
5333
5320
|
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "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."),
|
|
5334
5321
|
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "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."),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-56458-11",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "77383fdc53afe5fd1984eeef6606dac7fd5428a4"
|
|
119
119
|
}
|