typescript 4.9.0-dev.20220915 → 4.9.0-dev.20220916
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/cs/diagnosticMessages.generated.json +3 -0
- package/lib/de/diagnosticMessages.generated.json +3 -0
- package/lib/tsc.js +49 -14
- package/lib/tsserver.js +50 -17
- package/lib/tsserverlibrary.js +50 -17
- package/lib/typescript.js +50 -17
- package/lib/typescriptServices.js +50 -17
- package/lib/typingsInstaller.js +50 -17
- package/lib/zh-tw/diagnosticMessages.generated.json +3 -0
- package/package.json +1 -1
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
"An_abstract_accessor_cannot_have_an_implementation_1318": "Abstraktní přístupový objekt nemůže mít implementaci.",
|
|
187
187
|
"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "Modifikátor přístupnosti se nedá použít spolu s privátním identifikátorem.",
|
|
188
188
|
"An_accessor_cannot_have_type_parameters_1094": "Přístupový objekt nemůže obsahovat parametry typu.",
|
|
189
|
+
"An_accessor_property_cannot_be_declared_optional_1276": "Vlastnost accessor nejde deklarovat jako volitelnou.",
|
|
189
190
|
"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Deklarace ambientního modulu je povolená jenom na nejvyšší úrovni v souboru.",
|
|
190
191
|
"An_argument_for_0_was_not_provided_6210": "Neposkytl se argument pro {0}.",
|
|
191
192
|
"An_argument_matching_this_binding_pattern_was_not_provided_6211": "Neposkytl se argument, který by odpovídal tomuto vzoru vazby.",
|
|
@@ -1112,6 +1113,7 @@
|
|
|
1112
1113
|
"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "Odkazy projektu nemůžou tvořit cyklický graf. Zjistil se cyklus: {0}",
|
|
1113
1114
|
"Projects_6255": "Projekty",
|
|
1114
1115
|
"Projects_in_this_build_Colon_0_6355": "Projekty v tomto sestavení: {0}",
|
|
1116
|
+
"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045": "Vlastnosti s modifikátorem accessor jsou k dispozici jen při cílení na ECMAScript 2015 a vyšší.",
|
|
1115
1117
|
"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267": "Vlastnost {0} nemůže mít inicializátor, protože je označená jako abstraktní.",
|
|
1116
1118
|
"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111": "Vlastnost {0} pochází ze signatury indexu, proto je zapotřebí k ní přistupovat pomocí ['{0}'].",
|
|
1117
1119
|
"Property_0_does_not_exist_on_type_1_2339": "Vlastnost {0} v typu {1} neexistuje.",
|
|
@@ -1761,6 +1763,7 @@
|
|
|
1761
1763
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "{0} s chybějící anotací návratového typu má implicitně návratový typ {1}.",
|
|
1762
1764
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "{0} s chybějící anotací návratového typu má implicitně typ yield {1}.",
|
|
1763
1765
|
"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Modifikátor abstract se může objevit jenom v deklaraci třídy, metody nebo vlastnosti.",
|
|
1766
|
+
"accessor_modifier_can_only_appear_on_a_property_declaration_1275": "Modifikátor accessor se může objevit jenom v deklaraci vlastnosti.",
|
|
1764
1767
|
"and_here_6204": "a tady.",
|
|
1765
1768
|
"arguments_cannot_be_referenced_in_property_initializers_2815": "Na argumenty nejde odkazovat v inicializátorech vlastností.",
|
|
1766
1769
|
"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476": "auto: Považovat soubory s importy, exporty, import.meta, jsx (s jsx: react-jsx) nebo formátem esm (s modulem node16+) za moduly.",
|
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
"An_abstract_accessor_cannot_have_an_implementation_1318": "Ein abstrakter Accessor kann keine Implementierung aufweisen.",
|
|
187
187
|
"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "Ein Zugriffsmodifizierer kann nicht mit einem privaten Bezeichner verwendet werden.",
|
|
188
188
|
"An_accessor_cannot_have_type_parameters_1094": "Eine Zugriffsmethode darf keine Typparameter aufweisen.",
|
|
189
|
+
"An_accessor_property_cannot_be_declared_optional_1276": "Eine Accessoreigenschaft kann nicht als optional deklariert werden.",
|
|
189
190
|
"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "Eine Umgebungsmoduldeklaration ist nur auf der obersten Ebene in einer Datei zulässig.",
|
|
190
191
|
"An_argument_for_0_was_not_provided_6210": "Für \"{0}\" wurde ein Argument nicht angegeben.",
|
|
191
192
|
"An_argument_matching_this_binding_pattern_was_not_provided_6211": "Es wurde kein Argument angegeben, das diesem Bindungsmuster entspricht.",
|
|
@@ -1112,6 +1113,7 @@
|
|
|
1112
1113
|
"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "Projektverweise dürfen keinen kreisförmigen Graphen bilden. Zyklus erkannt: {0}",
|
|
1113
1114
|
"Projects_6255": "Projekte",
|
|
1114
1115
|
"Projects_in_this_build_Colon_0_6355": "Projekte in diesem Build: {0}",
|
|
1116
|
+
"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045": "Eigenschaften mit dem Accessormodifizierer sind nur für ECMAScript 2015 und höher verfügbar.",
|
|
1115
1117
|
"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267": "Die Eigenschaft \"{0}\" darf keinen Initialisierer aufweisen, weil sie als abstrakt markiert ist.",
|
|
1116
1118
|
"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111": "Die Eigenschaft \"{0}\" stammt aus einer Indexsignatur. Der Zugriff muss daher mit [\"{0}\"] erfolgen.",
|
|
1117
1119
|
"Property_0_does_not_exist_on_type_1_2339": "Die Eigenschaft \"{0}\" ist für den Typ \"{1}\" nicht vorhanden.",
|
|
@@ -1761,6 +1763,7 @@
|
|
|
1761
1763
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "\"{0}\" ohne Rückgabetypanmerkung weist implizit einen Rückgabetyp \"{1}\" auf.",
|
|
1762
1764
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "\"{0}\" ohne Rückgabetypanmerkung weist implizit einen yield-Typ \"{1}\" auf.",
|
|
1763
1765
|
"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "Der Modifizierer \"abstract\" darf nur für eine Klassen-, Methoden- oder Eigenschaftendeklaration verwendet werden.",
|
|
1766
|
+
"accessor_modifier_can_only_appear_on_a_property_declaration_1275": "Der Accessormodifizierer kann nur in einer Eigenschaftendeklaration angezeigt werden.",
|
|
1764
1767
|
"and_here_6204": "und hier.",
|
|
1765
1768
|
"arguments_cannot_be_referenced_in_property_initializers_2815": "Auf \"arguments\" kann in Eigenschaftsinitialisierern nicht verwiesen werden.",
|
|
1766
1769
|
"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476": "„auto“: Dateien mit imports, exports, import.meta, jsx (mit jsx: respond-jsx) oder esm-Format (mit module: node16+) als Module behandeln.",
|
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -7260,6 +7260,11 @@ var ts;
|
|
|
7260
7260
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
7261
7261
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
7262
7262
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
7263
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
7264
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
7265
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
7266
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
7267
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
7263
7268
|
};
|
|
7264
7269
|
})(ts || (ts = {}));
|
|
7265
7270
|
var ts;
|
|
@@ -44984,19 +44989,14 @@ var ts;
|
|
|
44984
44989
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
44985
44990
|
return parameterNode;
|
|
44986
44991
|
function cloneBindingName(node) {
|
|
44987
|
-
return
|
|
44988
|
-
function
|
|
44992
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
44993
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
44989
44994
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
44990
44995
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
44991
44996
|
}
|
|
44992
|
-
var visited = ts.visitEachChild(node,
|
|
44997
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndSetEmitFlags);
|
|
44993
44998
|
if (ts.isBindingElement(visited)) {
|
|
44994
|
-
|
|
44995
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, undefined, visited.propertyName, undefined);
|
|
44996
|
-
}
|
|
44997
|
-
else {
|
|
44998
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name, undefined);
|
|
44999
|
-
}
|
|
44999
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name, undefined);
|
|
45000
45000
|
}
|
|
45001
45001
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
45002
45002
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -63424,10 +63424,27 @@ var ts;
|
|
|
63424
63424
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
63425
63425
|
}
|
|
63426
63426
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
63427
|
-
|
|
63428
|
-
|
|
63429
|
-
ts.Diagnostics.
|
|
63430
|
-
|
|
63427
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
63428
|
+
if (node.kind === 104) {
|
|
63429
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
63430
|
+
return;
|
|
63431
|
+
}
|
|
63432
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
63433
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
63434
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
63435
|
+
return;
|
|
63436
|
+
}
|
|
63437
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
63438
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
63439
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
63440
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
63441
|
+
}
|
|
63442
|
+
else {
|
|
63443
|
+
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
63444
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
63445
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
63446
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
63447
|
+
}
|
|
63431
63448
|
}
|
|
63432
63449
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
63433
63450
|
error(node, facts & 16777216 ? facts & 33554432 ?
|
|
@@ -63437,6 +63454,13 @@ var ts;
|
|
|
63437
63454
|
}
|
|
63438
63455
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
63439
63456
|
if (strictNullChecks && type.flags & 2) {
|
|
63457
|
+
if (ts.isEntityNameExpression(node)) {
|
|
63458
|
+
var nodeText = ts.entityNameToString(node);
|
|
63459
|
+
if (nodeText.length < 100) {
|
|
63460
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
63461
|
+
return errorType;
|
|
63462
|
+
}
|
|
63463
|
+
}
|
|
63440
63464
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
63441
63465
|
return errorType;
|
|
63442
63466
|
}
|
|
@@ -63454,6 +63478,17 @@ var ts;
|
|
|
63454
63478
|
function checkNonNullNonVoidType(type, node) {
|
|
63455
63479
|
var nonNullType = checkNonNullType(type, node);
|
|
63456
63480
|
if (nonNullType.flags & 16384) {
|
|
63481
|
+
if (ts.isEntityNameExpression(node)) {
|
|
63482
|
+
var nodeText = ts.entityNameToString(node);
|
|
63483
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
63484
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
63485
|
+
return nonNullType;
|
|
63486
|
+
}
|
|
63487
|
+
if (nodeText.length < 100) {
|
|
63488
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
63489
|
+
return nonNullType;
|
|
63490
|
+
}
|
|
63491
|
+
}
|
|
63457
63492
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
63458
63493
|
}
|
|
63459
63494
|
return nonNullType;
|
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -10111,6 +10111,11 @@ var ts;
|
|
|
10111
10111
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
10112
10112
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
10113
10113
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
10114
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
10115
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
10116
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
10117
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
10118
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
10114
10119
|
};
|
|
10115
10120
|
})(ts || (ts = {}));
|
|
10116
10121
|
var ts;
|
|
@@ -54445,22 +54450,15 @@ var ts;
|
|
|
54445
54450
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54446
54451
|
return parameterNode;
|
|
54447
54452
|
function cloneBindingName(node) {
|
|
54448
|
-
return
|
|
54449
|
-
function
|
|
54453
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
54454
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
54450
54455
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
54451
54456
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
54452
54457
|
}
|
|
54453
|
-
var visited = ts.visitEachChild(node,
|
|
54458
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
|
|
54454
54459
|
if (ts.isBindingElement(visited)) {
|
|
54455
|
-
|
|
54456
|
-
|
|
54457
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54458
|
-
/*initializer*/ undefined);
|
|
54459
|
-
}
|
|
54460
|
-
else {
|
|
54461
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54462
|
-
/*initializer*/ undefined);
|
|
54463
|
-
}
|
|
54460
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54461
|
+
/*initializer*/ undefined);
|
|
54464
54462
|
}
|
|
54465
54463
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
54466
54464
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -75821,10 +75819,27 @@ var ts;
|
|
|
75821
75819
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
75822
75820
|
}
|
|
75823
75821
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
75824
|
-
|
|
75825
|
-
|
|
75826
|
-
ts.Diagnostics.
|
|
75827
|
-
|
|
75822
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
75823
|
+
if (node.kind === 104 /* SyntaxKind.NullKeyword */) {
|
|
75824
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
75825
|
+
return;
|
|
75826
|
+
}
|
|
75827
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
75828
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75829
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
75830
|
+
return;
|
|
75831
|
+
}
|
|
75832
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75833
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
75834
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
75835
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
75836
|
+
}
|
|
75837
|
+
else {
|
|
75838
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75839
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
75840
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
75841
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
75842
|
+
}
|
|
75828
75843
|
}
|
|
75829
75844
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
75830
75845
|
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
@@ -75834,6 +75849,13 @@ var ts;
|
|
|
75834
75849
|
}
|
|
75835
75850
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
75836
75851
|
if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) {
|
|
75852
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75853
|
+
var nodeText = ts.entityNameToString(node);
|
|
75854
|
+
if (nodeText.length < 100) {
|
|
75855
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
75856
|
+
return errorType;
|
|
75857
|
+
}
|
|
75858
|
+
}
|
|
75837
75859
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
75838
75860
|
return errorType;
|
|
75839
75861
|
}
|
|
@@ -75851,6 +75873,17 @@ var ts;
|
|
|
75851
75873
|
function checkNonNullNonVoidType(type, node) {
|
|
75852
75874
|
var nonNullType = checkNonNullType(type, node);
|
|
75853
75875
|
if (nonNullType.flags & 16384 /* TypeFlags.Void */) {
|
|
75876
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75877
|
+
var nodeText = ts.entityNameToString(node);
|
|
75878
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75879
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
75880
|
+
return nonNullType;
|
|
75881
|
+
}
|
|
75882
|
+
if (nodeText.length < 100) {
|
|
75883
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
75884
|
+
return nonNullType;
|
|
75885
|
+
}
|
|
75886
|
+
}
|
|
75854
75887
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
75855
75888
|
}
|
|
75856
75889
|
return nonNullType;
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -108,7 +108,7 @@ var ts;
|
|
|
108
108
|
// The following is baselined as a literal template type without intervention
|
|
109
109
|
/** The version of the TypeScript compiler release */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
111
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
111
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
112
112
|
/* @internal */
|
|
113
113
|
var Comparison;
|
|
114
114
|
(function (Comparison) {
|
|
@@ -10110,6 +10110,11 @@ var ts;
|
|
|
10110
10110
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
10111
10111
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
10112
10112
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
10113
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
10114
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
10115
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
10116
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
10117
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
10113
10118
|
};
|
|
10114
10119
|
})(ts || (ts = {}));
|
|
10115
10120
|
var ts;
|
|
@@ -54444,22 +54449,15 @@ var ts;
|
|
|
54444
54449
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54445
54450
|
return parameterNode;
|
|
54446
54451
|
function cloneBindingName(node) {
|
|
54447
|
-
return
|
|
54448
|
-
function
|
|
54452
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
54453
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
54449
54454
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
54450
54455
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
54451
54456
|
}
|
|
54452
|
-
var visited = ts.visitEachChild(node,
|
|
54457
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
|
|
54453
54458
|
if (ts.isBindingElement(visited)) {
|
|
54454
|
-
|
|
54455
|
-
|
|
54456
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54457
|
-
/*initializer*/ undefined);
|
|
54458
|
-
}
|
|
54459
|
-
else {
|
|
54460
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54461
|
-
/*initializer*/ undefined);
|
|
54462
|
-
}
|
|
54459
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54460
|
+
/*initializer*/ undefined);
|
|
54463
54461
|
}
|
|
54464
54462
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
54465
54463
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -75820,10 +75818,27 @@ var ts;
|
|
|
75820
75818
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
75821
75819
|
}
|
|
75822
75820
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
75823
|
-
|
|
75824
|
-
|
|
75825
|
-
ts.Diagnostics.
|
|
75826
|
-
|
|
75821
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
75822
|
+
if (node.kind === 104 /* SyntaxKind.NullKeyword */) {
|
|
75823
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
75824
|
+
return;
|
|
75825
|
+
}
|
|
75826
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
75827
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75828
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
75829
|
+
return;
|
|
75830
|
+
}
|
|
75831
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75832
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
75833
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
75834
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
75835
|
+
}
|
|
75836
|
+
else {
|
|
75837
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75838
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
75839
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
75840
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
75841
|
+
}
|
|
75827
75842
|
}
|
|
75828
75843
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
75829
75844
|
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
@@ -75833,6 +75848,13 @@ var ts;
|
|
|
75833
75848
|
}
|
|
75834
75849
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
75835
75850
|
if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) {
|
|
75851
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75852
|
+
var nodeText = ts.entityNameToString(node);
|
|
75853
|
+
if (nodeText.length < 100) {
|
|
75854
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
75855
|
+
return errorType;
|
|
75856
|
+
}
|
|
75857
|
+
}
|
|
75836
75858
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
75837
75859
|
return errorType;
|
|
75838
75860
|
}
|
|
@@ -75850,6 +75872,17 @@ var ts;
|
|
|
75850
75872
|
function checkNonNullNonVoidType(type, node) {
|
|
75851
75873
|
var nonNullType = checkNonNullType(type, node);
|
|
75852
75874
|
if (nonNullType.flags & 16384 /* TypeFlags.Void */) {
|
|
75875
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75876
|
+
var nodeText = ts.entityNameToString(node);
|
|
75877
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75878
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
75879
|
+
return nonNullType;
|
|
75880
|
+
}
|
|
75881
|
+
if (nodeText.length < 100) {
|
|
75882
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
75883
|
+
return nonNullType;
|
|
75884
|
+
}
|
|
75885
|
+
}
|
|
75853
75886
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
75854
75887
|
}
|
|
75855
75888
|
return nonNullType;
|
package/lib/typescript.js
CHANGED
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -10101,6 +10101,11 @@ var ts;
|
|
|
10101
10101
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
10102
10102
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
10103
10103
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
10104
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
10105
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
10106
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
10107
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
10108
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
10104
10109
|
};
|
|
10105
10110
|
})(ts || (ts = {}));
|
|
10106
10111
|
var ts;
|
|
@@ -54435,22 +54440,15 @@ var ts;
|
|
|
54435
54440
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54436
54441
|
return parameterNode;
|
|
54437
54442
|
function cloneBindingName(node) {
|
|
54438
|
-
return
|
|
54439
|
-
function
|
|
54443
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
54444
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
54440
54445
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
54441
54446
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
54442
54447
|
}
|
|
54443
|
-
var visited = ts.visitEachChild(node,
|
|
54448
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
|
|
54444
54449
|
if (ts.isBindingElement(visited)) {
|
|
54445
|
-
|
|
54446
|
-
|
|
54447
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54448
|
-
/*initializer*/ undefined);
|
|
54449
|
-
}
|
|
54450
|
-
else {
|
|
54451
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54452
|
-
/*initializer*/ undefined);
|
|
54453
|
-
}
|
|
54450
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54451
|
+
/*initializer*/ undefined);
|
|
54454
54452
|
}
|
|
54455
54453
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
54456
54454
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -75811,10 +75809,27 @@ var ts;
|
|
|
75811
75809
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
75812
75810
|
}
|
|
75813
75811
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
75814
|
-
|
|
75815
|
-
|
|
75816
|
-
ts.Diagnostics.
|
|
75817
|
-
|
|
75812
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
75813
|
+
if (node.kind === 104 /* SyntaxKind.NullKeyword */) {
|
|
75814
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
75815
|
+
return;
|
|
75816
|
+
}
|
|
75817
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
75818
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75819
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
75820
|
+
return;
|
|
75821
|
+
}
|
|
75822
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75823
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
75824
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
75825
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
75826
|
+
}
|
|
75827
|
+
else {
|
|
75828
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75829
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
75830
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
75831
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
75832
|
+
}
|
|
75818
75833
|
}
|
|
75819
75834
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
75820
75835
|
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
@@ -75824,6 +75839,13 @@ var ts;
|
|
|
75824
75839
|
}
|
|
75825
75840
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
75826
75841
|
if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) {
|
|
75842
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75843
|
+
var nodeText = ts.entityNameToString(node);
|
|
75844
|
+
if (nodeText.length < 100) {
|
|
75845
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
75846
|
+
return errorType;
|
|
75847
|
+
}
|
|
75848
|
+
}
|
|
75827
75849
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
75828
75850
|
return errorType;
|
|
75829
75851
|
}
|
|
@@ -75841,6 +75863,17 @@ var ts;
|
|
|
75841
75863
|
function checkNonNullNonVoidType(type, node) {
|
|
75842
75864
|
var nonNullType = checkNonNullType(type, node);
|
|
75843
75865
|
if (nonNullType.flags & 16384 /* TypeFlags.Void */) {
|
|
75866
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75867
|
+
var nodeText = ts.entityNameToString(node);
|
|
75868
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75869
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
75870
|
+
return nonNullType;
|
|
75871
|
+
}
|
|
75872
|
+
if (nodeText.length < 100) {
|
|
75873
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
75874
|
+
return nonNullType;
|
|
75875
|
+
}
|
|
75876
|
+
}
|
|
75844
75877
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
75845
75878
|
}
|
|
75846
75879
|
return nonNullType;
|
|
@@ -99,7 +99,7 @@ var ts;
|
|
|
99
99
|
// The following is baselined as a literal template type without intervention
|
|
100
100
|
/** The version of the TypeScript compiler release */
|
|
101
101
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
102
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
102
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
103
103
|
/* @internal */
|
|
104
104
|
var Comparison;
|
|
105
105
|
(function (Comparison) {
|
|
@@ -10101,6 +10101,11 @@ var ts;
|
|
|
10101
10101
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
10102
10102
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
10103
10103
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
10104
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
10105
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
10106
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
10107
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
10108
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
10104
10109
|
};
|
|
10105
10110
|
})(ts || (ts = {}));
|
|
10106
10111
|
var ts;
|
|
@@ -54435,22 +54440,15 @@ var ts;
|
|
|
54435
54440
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54436
54441
|
return parameterNode;
|
|
54437
54442
|
function cloneBindingName(node) {
|
|
54438
|
-
return
|
|
54439
|
-
function
|
|
54443
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
54444
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
54440
54445
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
54441
54446
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
54442
54447
|
}
|
|
54443
|
-
var visited = ts.visitEachChild(node,
|
|
54448
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
|
|
54444
54449
|
if (ts.isBindingElement(visited)) {
|
|
54445
|
-
|
|
54446
|
-
|
|
54447
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54448
|
-
/*initializer*/ undefined);
|
|
54449
|
-
}
|
|
54450
|
-
else {
|
|
54451
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54452
|
-
/*initializer*/ undefined);
|
|
54453
|
-
}
|
|
54450
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54451
|
+
/*initializer*/ undefined);
|
|
54454
54452
|
}
|
|
54455
54453
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
54456
54454
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -75811,10 +75809,27 @@ var ts;
|
|
|
75811
75809
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
75812
75810
|
}
|
|
75813
75811
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
75814
|
-
|
|
75815
|
-
|
|
75816
|
-
ts.Diagnostics.
|
|
75817
|
-
|
|
75812
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
75813
|
+
if (node.kind === 104 /* SyntaxKind.NullKeyword */) {
|
|
75814
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
75815
|
+
return;
|
|
75816
|
+
}
|
|
75817
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
75818
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75819
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
75820
|
+
return;
|
|
75821
|
+
}
|
|
75822
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75823
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
75824
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
75825
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
75826
|
+
}
|
|
75827
|
+
else {
|
|
75828
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75829
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
75830
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
75831
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
75832
|
+
}
|
|
75818
75833
|
}
|
|
75819
75834
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
75820
75835
|
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
@@ -75824,6 +75839,13 @@ var ts;
|
|
|
75824
75839
|
}
|
|
75825
75840
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
75826
75841
|
if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) {
|
|
75842
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75843
|
+
var nodeText = ts.entityNameToString(node);
|
|
75844
|
+
if (nodeText.length < 100) {
|
|
75845
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
75846
|
+
return errorType;
|
|
75847
|
+
}
|
|
75848
|
+
}
|
|
75827
75849
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
75828
75850
|
return errorType;
|
|
75829
75851
|
}
|
|
@@ -75841,6 +75863,17 @@ var ts;
|
|
|
75841
75863
|
function checkNonNullNonVoidType(type, node) {
|
|
75842
75864
|
var nonNullType = checkNonNullType(type, node);
|
|
75843
75865
|
if (nonNullType.flags & 16384 /* TypeFlags.Void */) {
|
|
75866
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75867
|
+
var nodeText = ts.entityNameToString(node);
|
|
75868
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75869
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
75870
|
+
return nonNullType;
|
|
75871
|
+
}
|
|
75872
|
+
if (nodeText.length < 100) {
|
|
75873
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
75874
|
+
return nonNullType;
|
|
75875
|
+
}
|
|
75876
|
+
}
|
|
75844
75877
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
75845
75878
|
}
|
|
75846
75879
|
return nonNullType;
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.
|
|
92
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-dev.20220916");
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -10091,6 +10091,11 @@ var ts;
|
|
|
10091
10091
|
Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, ts.DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."),
|
|
10092
10092
|
_0_is_automatically_exported_here: diag(18044, ts.DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."),
|
|
10093
10093
|
Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, ts.DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),
|
|
10094
|
+
_0_is_of_type_unknown: diag(18046, ts.DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."),
|
|
10095
|
+
_0_is_possibly_null: diag(18047, ts.DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."),
|
|
10096
|
+
_0_is_possibly_undefined: diag(18048, ts.DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
|
|
10097
|
+
_0_is_possibly_null_or_undefined: diag(18049, ts.DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
|
|
10098
|
+
The_value_0_cannot_be_used_here: diag(18050, ts.DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
|
|
10094
10099
|
};
|
|
10095
10100
|
})(ts || (ts = {}));
|
|
10096
10101
|
var ts;
|
|
@@ -54425,22 +54430,15 @@ var ts;
|
|
|
54425
54430
|
context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
|
|
54426
54431
|
return parameterNode;
|
|
54427
54432
|
function cloneBindingName(node) {
|
|
54428
|
-
return
|
|
54429
|
-
function
|
|
54433
|
+
return elideInitializerAndSetEmitFlags(node);
|
|
54434
|
+
function elideInitializerAndSetEmitFlags(node) {
|
|
54430
54435
|
if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
|
|
54431
54436
|
trackComputedName(node.expression, context.enclosingDeclaration, context);
|
|
54432
54437
|
}
|
|
54433
|
-
var visited = ts.visitEachChild(node,
|
|
54438
|
+
var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
|
|
54434
54439
|
if (ts.isBindingElement(visited)) {
|
|
54435
|
-
|
|
54436
|
-
|
|
54437
|
-
/* propertyName*/ undefined, visited.propertyName,
|
|
54438
|
-
/*initializer*/ undefined);
|
|
54439
|
-
}
|
|
54440
|
-
else {
|
|
54441
|
-
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54442
|
-
/*initializer*/ undefined);
|
|
54443
|
-
}
|
|
54440
|
+
visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name,
|
|
54441
|
+
/*initializer*/ undefined);
|
|
54444
54442
|
}
|
|
54445
54443
|
if (!ts.nodeIsSynthesized(visited)) {
|
|
54446
54444
|
visited = ts.factory.cloneNode(visited);
|
|
@@ -75801,10 +75799,27 @@ var ts;
|
|
|
75801
75799
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
75802
75800
|
}
|
|
75803
75801
|
function reportObjectPossiblyNullOrUndefinedError(node, facts) {
|
|
75804
|
-
|
|
75805
|
-
|
|
75806
|
-
ts.Diagnostics.
|
|
75807
|
-
|
|
75802
|
+
var nodeText = ts.isEntityNameExpression(node) ? ts.entityNameToString(node) : undefined;
|
|
75803
|
+
if (node.kind === 104 /* SyntaxKind.NullKeyword */) {
|
|
75804
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "null");
|
|
75805
|
+
return;
|
|
75806
|
+
}
|
|
75807
|
+
if (nodeText !== undefined && nodeText.length < 100) {
|
|
75808
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75809
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, "undefined");
|
|
75810
|
+
return;
|
|
75811
|
+
}
|
|
75812
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75813
|
+
ts.Diagnostics._0_is_possibly_null_or_undefined :
|
|
75814
|
+
ts.Diagnostics._0_is_possibly_undefined :
|
|
75815
|
+
ts.Diagnostics._0_is_possibly_null, nodeText);
|
|
75816
|
+
}
|
|
75817
|
+
else {
|
|
75818
|
+
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
75819
|
+
ts.Diagnostics.Object_is_possibly_null_or_undefined :
|
|
75820
|
+
ts.Diagnostics.Object_is_possibly_undefined :
|
|
75821
|
+
ts.Diagnostics.Object_is_possibly_null);
|
|
75822
|
+
}
|
|
75808
75823
|
}
|
|
75809
75824
|
function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) {
|
|
75810
75825
|
error(node, facts & 16777216 /* TypeFacts.IsUndefined */ ? facts & 33554432 /* TypeFacts.IsNull */ ?
|
|
@@ -75814,6 +75829,13 @@ var ts;
|
|
|
75814
75829
|
}
|
|
75815
75830
|
function checkNonNullTypeWithReporter(type, node, reportError) {
|
|
75816
75831
|
if (strictNullChecks && type.flags & 2 /* TypeFlags.Unknown */) {
|
|
75832
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75833
|
+
var nodeText = ts.entityNameToString(node);
|
|
75834
|
+
if (nodeText.length < 100) {
|
|
75835
|
+
error(node, ts.Diagnostics._0_is_of_type_unknown, nodeText);
|
|
75836
|
+
return errorType;
|
|
75837
|
+
}
|
|
75838
|
+
}
|
|
75817
75839
|
error(node, ts.Diagnostics.Object_is_of_type_unknown);
|
|
75818
75840
|
return errorType;
|
|
75819
75841
|
}
|
|
@@ -75831,6 +75853,17 @@ var ts;
|
|
|
75831
75853
|
function checkNonNullNonVoidType(type, node) {
|
|
75832
75854
|
var nonNullType = checkNonNullType(type, node);
|
|
75833
75855
|
if (nonNullType.flags & 16384 /* TypeFlags.Void */) {
|
|
75856
|
+
if (ts.isEntityNameExpression(node)) {
|
|
75857
|
+
var nodeText = ts.entityNameToString(node);
|
|
75858
|
+
if (ts.isIdentifier(node) && nodeText === "undefined") {
|
|
75859
|
+
error(node, ts.Diagnostics.The_value_0_cannot_be_used_here, nodeText);
|
|
75860
|
+
return nonNullType;
|
|
75861
|
+
}
|
|
75862
|
+
if (nodeText.length < 100) {
|
|
75863
|
+
error(node, ts.Diagnostics._0_is_possibly_undefined, nodeText);
|
|
75864
|
+
return nonNullType;
|
|
75865
|
+
}
|
|
75866
|
+
}
|
|
75834
75867
|
error(node, ts.Diagnostics.Object_is_possibly_undefined);
|
|
75835
75868
|
}
|
|
75836
75869
|
return nonNullType;
|
|
@@ -186,6 +186,7 @@
|
|
|
186
186
|
"An_abstract_accessor_cannot_have_an_implementation_1318": "抽象存取子無法實作。",
|
|
187
187
|
"An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010": "協助工具修飾元不可搭配私人識別碼使用。",
|
|
188
188
|
"An_accessor_cannot_have_type_parameters_1094": "存取子不得有類型參數。",
|
|
189
|
+
"An_accessor_property_cannot_be_declared_optional_1276": "無法將 'accessor' 屬性宣告為選擇性。",
|
|
189
190
|
"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234": "環境模組宣告只可出現在檔案的最上層。",
|
|
190
191
|
"An_argument_for_0_was_not_provided_6210": "未提供 '{0}' 的引數。",
|
|
191
192
|
"An_argument_matching_this_binding_pattern_was_not_provided_6211": "未提供符合此繫結模式的引數。",
|
|
@@ -1112,6 +1113,7 @@
|
|
|
1112
1113
|
"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202": "專案參考不會形成循環圖。但偵測到循環: {0}",
|
|
1113
1114
|
"Projects_6255": "專案",
|
|
1114
1115
|
"Projects_in_this_build_Colon_0_6355": "此組建中的專案: {0}",
|
|
1116
|
+
"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045": "只有以 ECMAScript 2015 及更新版本為目標時,才可使用具有 'accessor' 修飾詞的屬性。",
|
|
1115
1117
|
"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267": "屬性 '{0}' 已標記為抽象,因此不得有初始設定式。",
|
|
1116
1118
|
"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111": "屬性 '{0}' 來自索引簽章,因此必須使用 ['{0}'] 存取。",
|
|
1117
1119
|
"Property_0_does_not_exist_on_type_1_2339": "類型 '{1}' 沒有屬性 '{0}'。",
|
|
@@ -1761,6 +1763,7 @@
|
|
|
1761
1763
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010": "缺少傳回型別註解的 '{0}' 隱含了 '{1}' 傳回型別。",
|
|
1762
1764
|
"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055": "缺少傳回型別註解的 '{0}' 隱含 '{1}' 產生類型。",
|
|
1763
1765
|
"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242": "'abstract' 修飾元只能出現在類別宣告、方法宣告或屬性宣告。",
|
|
1766
|
+
"accessor_modifier_can_only_appear_on_a_property_declaration_1275": "'accessor' 修飾詞只能出現在屬性宣告。",
|
|
1764
1767
|
"and_here_6204": "及此處。",
|
|
1765
1768
|
"arguments_cannot_be_referenced_in_property_initializers_2815": "屬性初始設定式中不得參考 'arguments'。",
|
|
1766
1769
|
"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476": "\"auto\": 處理具有 imports、exports、import.meta, jsx (具有 jsx: react-jsx) 的檔案,或以 esm 格式 (具有 module: node16+) 作為模組。",
|
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": "4.9.0-dev.
|
|
5
|
+
"version": "4.9.0-dev.20220916",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|