typescript 5.4.0-dev.20231120 → 5.4.0-dev.20231122
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 +135 -77
- package/lib/tsserver.js +171 -91
- package/lib/typescript.d.ts +5 -3
- package/lib/typescript.js +170 -91
- package/lib/typingsInstaller.js +23 -23
- package/package.json +2 -2
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-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20231122`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -3095,7 +3095,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
|
|
|
3095
3095
|
TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive";
|
|
3096
3096
|
TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
|
|
3097
3097
|
TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
|
|
3098
|
-
TypeFlags2[TypeFlags2["ObjectFlagsType"] =
|
|
3098
|
+
TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
|
|
3099
3099
|
TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable";
|
|
3100
3100
|
TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
|
|
3101
3101
|
TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
|
|
@@ -5312,6 +5312,10 @@ var Diagnostics = {
|
|
|
5312
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."),
|
|
5313
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."),
|
|
5314
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 }'."),
|
|
5315
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."),
|
|
5316
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."),
|
|
5317
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."),
|
|
@@ -12333,7 +12337,7 @@ var nullNodeConverters = {
|
|
|
12333
12337
|
var nextAutoGenerateId = 0;
|
|
12334
12338
|
var nodeFactoryPatchers = [];
|
|
12335
12339
|
function createNodeFactory(flags, baseFactory2) {
|
|
12336
|
-
const
|
|
12340
|
+
const setOriginal = flags & 8 /* NoOriginalNode */ ? identity : setOriginalNode;
|
|
12337
12341
|
const parenthesizerRules = memoize(() => flags & 1 /* NoParenthesizerRules */ ? nullParenthesizerRules : createParenthesizerRules(factory2));
|
|
12338
12342
|
const converters = memoize(() => flags & 2 /* NoNodeConverters */ ? nullNodeConverters : createNodeConverters(factory2));
|
|
12339
12343
|
const getBinaryCreateFunction = memoizeOne((operator) => (left, right) => createBinaryExpression(left, operator, right));
|
|
@@ -15831,7 +15835,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15831
15835
|
}
|
|
15832
15836
|
function cloneSourceFile(source) {
|
|
15833
15837
|
const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source);
|
|
15834
|
-
|
|
15838
|
+
setOriginal(node, source);
|
|
15835
15839
|
return node;
|
|
15836
15840
|
}
|
|
15837
15841
|
function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
|
|
@@ -15964,7 +15968,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15964
15968
|
const clone2 = createBaseIdentifier(node.escapedText);
|
|
15965
15969
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15966
15970
|
clone2.transformFlags = node.transformFlags;
|
|
15967
|
-
|
|
15971
|
+
setOriginal(clone2, node);
|
|
15968
15972
|
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
15969
15973
|
return clone2;
|
|
15970
15974
|
}
|
|
@@ -15975,7 +15979,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15975
15979
|
clone2.flowNode = node.flowNode;
|
|
15976
15980
|
clone2.symbol = node.symbol;
|
|
15977
15981
|
clone2.transformFlags = node.transformFlags;
|
|
15978
|
-
|
|
15982
|
+
setOriginal(clone2, node);
|
|
15979
15983
|
const typeArguments = getIdentifierTypeArguments(node);
|
|
15980
15984
|
if (typeArguments)
|
|
15981
15985
|
setIdentifierTypeArguments(clone2, typeArguments);
|
|
@@ -15985,7 +15989,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15985
15989
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15986
15990
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15987
15991
|
clone2.transformFlags = node.transformFlags;
|
|
15988
|
-
|
|
15992
|
+
setOriginal(clone2, node);
|
|
15989
15993
|
setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate });
|
|
15990
15994
|
return clone2;
|
|
15991
15995
|
}
|
|
@@ -15993,7 +15997,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
15993
15997
|
const clone2 = createBasePrivateIdentifier(node.escapedText);
|
|
15994
15998
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
15995
15999
|
clone2.transformFlags = node.transformFlags;
|
|
15996
|
-
|
|
16000
|
+
setOriginal(clone2, node);
|
|
15997
16001
|
return clone2;
|
|
15998
16002
|
}
|
|
15999
16003
|
function cloneNode(node) {
|
|
@@ -16018,7 +16022,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16018
16022
|
const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind);
|
|
16019
16023
|
clone2.flags |= node.flags & ~16 /* Synthesized */;
|
|
16020
16024
|
clone2.transformFlags = node.transformFlags;
|
|
16021
|
-
|
|
16025
|
+
setOriginal(clone2, node);
|
|
16022
16026
|
for (const key in node) {
|
|
16023
16027
|
if (hasProperty(clone2, key) || !hasProperty(node, key)) {
|
|
16024
16028
|
continue;
|
|
@@ -16543,7 +16547,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16543
16547
|
return typeof value === "number" ? createToken(value) : value;
|
|
16544
16548
|
}
|
|
16545
16549
|
function asEmbeddedStatement(statement) {
|
|
16546
|
-
return statement && isNotEmittedStatement(statement) ? setTextRange(
|
|
16550
|
+
return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginal(createEmptyStatement(), statement), statement) : statement;
|
|
16547
16551
|
}
|
|
16548
16552
|
function asVariableDeclaration(variableDeclaration) {
|
|
16549
16553
|
if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) {
|
|
@@ -16559,19 +16563,13 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
16559
16563
|
}
|
|
16560
16564
|
return variableDeclaration;
|
|
16561
16565
|
}
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
}
|
|
16569
|
-
function updateWithOriginal(updated, original) {
|
|
16570
|
-
if (updated !== original) {
|
|
16571
|
-
setOriginalNode(updated, original);
|
|
16572
|
-
setTextRange(updated, original);
|
|
16566
|
+
function update(updated, original) {
|
|
16567
|
+
if (updated !== original) {
|
|
16568
|
+
setOriginal(updated, original);
|
|
16569
|
+
setTextRange(updated, original);
|
|
16570
|
+
}
|
|
16571
|
+
return updated;
|
|
16573
16572
|
}
|
|
16574
|
-
return updated;
|
|
16575
16573
|
}
|
|
16576
16574
|
function getDefaultTagNameForKind(kind) {
|
|
16577
16575
|
switch (kind) {
|
|
@@ -18707,8 +18705,10 @@ var Parser;
|
|
|
18707
18705
|
setTextRangePosWidth(sourceFile, 0, sourceText.length);
|
|
18708
18706
|
setFields(sourceFile);
|
|
18709
18707
|
if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */) {
|
|
18708
|
+
const oldSourceFile = sourceFile;
|
|
18710
18709
|
sourceFile = reparseTopLevelAwait(sourceFile);
|
|
18711
|
-
|
|
18710
|
+
if (oldSourceFile !== sourceFile)
|
|
18711
|
+
setFields(sourceFile);
|
|
18712
18712
|
}
|
|
18713
18713
|
return sourceFile;
|
|
18714
18714
|
function setFields(sourceFile2) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-dev.
|
|
5
|
+
"version": "5.4.0-dev.20231122",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "20.1.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "b9ae79192cc04c4231c76157fa35d566fad0026e"
|
|
118
118
|
}
|