typescript 4.5.0-dev.20211017 → 4.5.0-dev.20211021
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 -2
- package/lib/de/diagnosticMessages.generated.json +3 -2
- package/lib/es/diagnosticMessages.generated.json +3 -2
- package/lib/fr/diagnosticMessages.generated.json +3 -2
- package/lib/it/diagnosticMessages.generated.json +3 -2
- package/lib/ja/diagnosticMessages.generated.json +3 -2
- package/lib/ko/diagnosticMessages.generated.json +3 -2
- package/lib/pl/diagnosticMessages.generated.json +3 -2
- package/lib/pt-br/diagnosticMessages.generated.json +3 -2
- package/lib/ru/diagnosticMessages.generated.json +3 -2
- package/lib/tr/diagnosticMessages.generated.json +3 -2
- package/lib/tsc.js +88 -43
- package/lib/tsserver.js +123 -52
- package/lib/tsserverlibrary.d.ts +6 -4
- package/lib/tsserverlibrary.js +123 -52
- package/lib/typescript.d.ts +6 -4
- package/lib/typescript.js +123 -52
- package/lib/typescriptServices.d.ts +6 -4
- package/lib/typescriptServices.js +123 -52
- package/lib/typingsInstaller.js +89 -44
- package/lib/zh-cn/diagnosticMessages.generated.json +3 -2
- package/lib/zh-tw/diagnosticMessages.generated.json +3 -2
- package/package.json +1 -1
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 = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211021";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -9330,6 +9330,7 @@ var ts;
|
|
|
9330
9330
|
If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),
|
|
9331
9331
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
|
|
9332
9332
|
This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
|
|
9333
|
+
A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
|
|
9333
9334
|
You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
|
|
9334
9335
|
You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
|
|
9335
9336
|
import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
|
|
@@ -22894,24 +22895,26 @@ var ts;
|
|
|
22894
22895
|
: node;
|
|
22895
22896
|
}
|
|
22896
22897
|
// @api
|
|
22897
|
-
function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type) {
|
|
22898
|
+
function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
22898
22899
|
var node = createBaseNode(194 /* MappedType */);
|
|
22899
22900
|
node.readonlyToken = readonlyToken;
|
|
22900
22901
|
node.typeParameter = typeParameter;
|
|
22901
22902
|
node.nameType = nameType;
|
|
22902
22903
|
node.questionToken = questionToken;
|
|
22903
22904
|
node.type = type;
|
|
22905
|
+
node.members = members && createNodeArray(members);
|
|
22904
22906
|
node.transformFlags = 1 /* ContainsTypeScript */;
|
|
22905
22907
|
return node;
|
|
22906
22908
|
}
|
|
22907
22909
|
// @api
|
|
22908
|
-
function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type) {
|
|
22910
|
+
function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
|
|
22909
22911
|
return node.readonlyToken !== readonlyToken
|
|
22910
22912
|
|| node.typeParameter !== typeParameter
|
|
22911
22913
|
|| node.nameType !== nameType
|
|
22912
22914
|
|| node.questionToken !== questionToken
|
|
22913
22915
|
|| node.type !== type
|
|
22914
|
-
|
|
22916
|
+
|| node.members !== members
|
|
22917
|
+
? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node)
|
|
22915
22918
|
: node;
|
|
22916
22919
|
}
|
|
22917
22920
|
// @api
|
|
@@ -29784,7 +29787,8 @@ var ts;
|
|
|
29784
29787
|
visitNode(cbNode, node.typeParameter) ||
|
|
29785
29788
|
visitNode(cbNode, node.nameType) ||
|
|
29786
29789
|
visitNode(cbNode, node.questionToken) ||
|
|
29787
|
-
visitNode(cbNode, node.type)
|
|
29790
|
+
visitNode(cbNode, node.type) ||
|
|
29791
|
+
visitNodes(cbNode, cbNodes, node.members);
|
|
29788
29792
|
case 195 /* LiteralType */:
|
|
29789
29793
|
return visitNode(cbNode, node.literal);
|
|
29790
29794
|
case 196 /* NamedTupleMember */:
|
|
@@ -32674,8 +32678,9 @@ var ts;
|
|
|
32674
32678
|
}
|
|
32675
32679
|
var type = parseTypeAnnotation();
|
|
32676
32680
|
parseSemicolon();
|
|
32681
|
+
var members = parseList(4 /* TypeMembers */, parseTypeMember);
|
|
32677
32682
|
parseExpected(19 /* CloseBraceToken */);
|
|
32678
|
-
return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), pos);
|
|
32683
|
+
return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
|
|
32679
32684
|
}
|
|
32680
32685
|
function parseTupleElementType() {
|
|
32681
32686
|
var pos = getNodePos();
|
|
@@ -37962,7 +37967,7 @@ var ts;
|
|
|
37962
37967
|
var ts;
|
|
37963
37968
|
(function (ts) {
|
|
37964
37969
|
/* @internal */
|
|
37965
|
-
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
|
|
37970
|
+
ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
|
|
37966
37971
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
37967
37972
|
"preserve": 1 /* Preserve */,
|
|
37968
37973
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38099,6 +38104,7 @@ var ts;
|
|
|
38099
38104
|
type: "boolean",
|
|
38100
38105
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38101
38106
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38107
|
+
defaultValueDescription: "false",
|
|
38102
38108
|
},
|
|
38103
38109
|
{
|
|
38104
38110
|
name: "excludeDirectories",
|
|
@@ -38134,11 +38140,13 @@ var ts;
|
|
|
38134
38140
|
showInSimplifiedHelpView: true,
|
|
38135
38141
|
category: ts.Diagnostics.Command_line_Options,
|
|
38136
38142
|
description: ts.Diagnostics.Print_this_message,
|
|
38143
|
+
defaultValueDescription: "false",
|
|
38137
38144
|
},
|
|
38138
38145
|
{
|
|
38139
38146
|
name: "help",
|
|
38140
38147
|
shortName: "?",
|
|
38141
|
-
type: "boolean"
|
|
38148
|
+
type: "boolean",
|
|
38149
|
+
defaultValueDescription: "false",
|
|
38142
38150
|
},
|
|
38143
38151
|
{
|
|
38144
38152
|
name: "watch",
|
|
@@ -38148,6 +38156,7 @@ var ts;
|
|
|
38148
38156
|
isCommandLineOnly: true,
|
|
38149
38157
|
category: ts.Diagnostics.Command_line_Options,
|
|
38150
38158
|
description: ts.Diagnostics.Watch_input_files,
|
|
38159
|
+
defaultValueDescription: "false",
|
|
38151
38160
|
},
|
|
38152
38161
|
{
|
|
38153
38162
|
name: "preserveWatchOutput",
|
|
@@ -38155,7 +38164,7 @@ var ts;
|
|
|
38155
38164
|
showInSimplifiedHelpView: false,
|
|
38156
38165
|
category: ts.Diagnostics.Output_Formatting,
|
|
38157
38166
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38158
|
-
defaultValueDescription: "
|
|
38167
|
+
defaultValueDescription: "false",
|
|
38159
38168
|
},
|
|
38160
38169
|
{
|
|
38161
38170
|
name: "listFiles",
|
|
@@ -38168,7 +38177,8 @@ var ts;
|
|
|
38168
38177
|
name: "explainFiles",
|
|
38169
38178
|
type: "boolean",
|
|
38170
38179
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38171
|
-
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included
|
|
38180
|
+
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38181
|
+
defaultValueDescription: "false",
|
|
38172
38182
|
},
|
|
38173
38183
|
{
|
|
38174
38184
|
name: "listEmittedFiles",
|
|
@@ -38239,7 +38249,8 @@ var ts;
|
|
|
38239
38249
|
affectsSemanticDiagnostics: true,
|
|
38240
38250
|
affectsEmit: true,
|
|
38241
38251
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38242
|
-
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it
|
|
38252
|
+
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
|
38253
|
+
defaultValueDescription: "false",
|
|
38243
38254
|
},
|
|
38244
38255
|
{
|
|
38245
38256
|
name: "locale",
|
|
@@ -38284,6 +38295,7 @@ var ts;
|
|
|
38284
38295
|
showInSimplifiedHelpView: true,
|
|
38285
38296
|
category: ts.Diagnostics.Command_line_Options,
|
|
38286
38297
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38298
|
+
defaultValueDescription: "false",
|
|
38287
38299
|
},
|
|
38288
38300
|
{
|
|
38289
38301
|
name: "version",
|
|
@@ -38292,6 +38304,7 @@ var ts;
|
|
|
38292
38304
|
showInSimplifiedHelpView: true,
|
|
38293
38305
|
category: ts.Diagnostics.Command_line_Options,
|
|
38294
38306
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38307
|
+
defaultValueDescription: "false",
|
|
38295
38308
|
},
|
|
38296
38309
|
{
|
|
38297
38310
|
name: "init",
|
|
@@ -38299,6 +38312,7 @@ var ts;
|
|
|
38299
38312
|
showInSimplifiedHelpView: true,
|
|
38300
38313
|
category: ts.Diagnostics.Command_line_Options,
|
|
38301
38314
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38315
|
+
defaultValueDescription: "false",
|
|
38302
38316
|
},
|
|
38303
38317
|
{
|
|
38304
38318
|
name: "project",
|
|
@@ -38316,7 +38330,8 @@ var ts;
|
|
|
38316
38330
|
shortName: "b",
|
|
38317
38331
|
showInSimplifiedHelpView: true,
|
|
38318
38332
|
category: ts.Diagnostics.Command_line_Options,
|
|
38319
|
-
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date
|
|
38333
|
+
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38334
|
+
defaultValueDescription: "false",
|
|
38320
38335
|
},
|
|
38321
38336
|
{
|
|
38322
38337
|
name: "showConfig",
|
|
@@ -38324,7 +38339,8 @@ var ts;
|
|
|
38324
38339
|
showInSimplifiedHelpView: true,
|
|
38325
38340
|
category: ts.Diagnostics.Command_line_Options,
|
|
38326
38341
|
isCommandLineOnly: true,
|
|
38327
|
-
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building
|
|
38342
|
+
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38343
|
+
defaultValueDescription: "false",
|
|
38328
38344
|
},
|
|
38329
38345
|
{
|
|
38330
38346
|
name: "listFilesOnly",
|
|
@@ -38333,7 +38349,8 @@ var ts;
|
|
|
38333
38349
|
affectsSemanticDiagnostics: true,
|
|
38334
38350
|
affectsEmit: true,
|
|
38335
38351
|
isCommandLineOnly: true,
|
|
38336
|
-
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing
|
|
38352
|
+
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38353
|
+
defaultValueDescription: "false",
|
|
38337
38354
|
},
|
|
38338
38355
|
// Basic
|
|
38339
38356
|
ts.targetOptionDeclaration,
|
|
@@ -38453,7 +38470,6 @@ var ts;
|
|
|
38453
38470
|
category: ts.Diagnostics.Emit,
|
|
38454
38471
|
description: ts.Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,
|
|
38455
38472
|
transpileOptionValue: undefined,
|
|
38456
|
-
defaultValueDescription: "n/a"
|
|
38457
38473
|
},
|
|
38458
38474
|
{
|
|
38459
38475
|
name: "outDir",
|
|
@@ -38464,7 +38480,6 @@ var ts;
|
|
|
38464
38480
|
showInSimplifiedHelpView: true,
|
|
38465
38481
|
category: ts.Diagnostics.Emit,
|
|
38466
38482
|
description: ts.Diagnostics.Specify_an_output_folder_for_all_emitted_files,
|
|
38467
|
-
defaultValueDescription: "n/a"
|
|
38468
38483
|
},
|
|
38469
38484
|
{
|
|
38470
38485
|
name: "rootDir",
|
|
@@ -38621,6 +38636,7 @@ var ts;
|
|
|
38621
38636
|
strictFlag: true,
|
|
38622
38637
|
category: ts.Diagnostics.Type_Checking,
|
|
38623
38638
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38639
|
+
defaultValueDescription: "false",
|
|
38624
38640
|
},
|
|
38625
38641
|
{
|
|
38626
38642
|
name: "alwaysStrict",
|
|
@@ -38653,7 +38669,8 @@ var ts;
|
|
|
38653
38669
|
type: "boolean",
|
|
38654
38670
|
affectsSemanticDiagnostics: true,
|
|
38655
38671
|
category: ts.Diagnostics.Type_Checking,
|
|
38656
|
-
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined
|
|
38672
|
+
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38673
|
+
defaultValueDescription: "false",
|
|
38657
38674
|
},
|
|
38658
38675
|
{
|
|
38659
38676
|
name: "noImplicitReturns",
|
|
@@ -38669,21 +38686,24 @@ var ts;
|
|
|
38669
38686
|
affectsBindDiagnostics: true,
|
|
38670
38687
|
affectsSemanticDiagnostics: true,
|
|
38671
38688
|
category: ts.Diagnostics.Type_Checking,
|
|
38672
|
-
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements
|
|
38689
|
+
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38690
|
+
defaultValueDescription: "false",
|
|
38673
38691
|
},
|
|
38674
38692
|
{
|
|
38675
38693
|
name: "noUncheckedIndexedAccess",
|
|
38676
38694
|
type: "boolean",
|
|
38677
38695
|
affectsSemanticDiagnostics: true,
|
|
38678
38696
|
category: ts.Diagnostics.Type_Checking,
|
|
38679
|
-
description: ts.Diagnostics.Include_undefined_in_index_signature_results
|
|
38697
|
+
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38698
|
+
defaultValueDescription: "false",
|
|
38680
38699
|
},
|
|
38681
38700
|
{
|
|
38682
38701
|
name: "noImplicitOverride",
|
|
38683
38702
|
type: "boolean",
|
|
38684
38703
|
affectsSemanticDiagnostics: true,
|
|
38685
38704
|
category: ts.Diagnostics.Type_Checking,
|
|
38686
|
-
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier
|
|
38705
|
+
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38706
|
+
defaultValueDescription: "false",
|
|
38687
38707
|
},
|
|
38688
38708
|
{
|
|
38689
38709
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38792,7 +38812,7 @@ var ts;
|
|
|
38792
38812
|
type: "boolean",
|
|
38793
38813
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38794
38814
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
38795
|
-
defaultValueDescription: "
|
|
38815
|
+
defaultValueDescription: "false",
|
|
38796
38816
|
},
|
|
38797
38817
|
{
|
|
38798
38818
|
name: "allowUmdGlobalAccess",
|
|
@@ -38841,7 +38861,8 @@ var ts;
|
|
|
38841
38861
|
type: "boolean",
|
|
38842
38862
|
affectsSemanticDiagnostics: true,
|
|
38843
38863
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38844
|
-
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators
|
|
38864
|
+
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
38865
|
+
defaultValueDescription: "false",
|
|
38845
38866
|
},
|
|
38846
38867
|
{
|
|
38847
38868
|
name: "emitDecoratorMetadata",
|
|
@@ -38849,7 +38870,8 @@ var ts;
|
|
|
38849
38870
|
affectsSemanticDiagnostics: true,
|
|
38850
38871
|
affectsEmit: true,
|
|
38851
38872
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38852
|
-
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files
|
|
38873
|
+
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
38874
|
+
defaultValueDescription: "false",
|
|
38853
38875
|
},
|
|
38854
38876
|
// Advanced
|
|
38855
38877
|
{
|
|
@@ -38892,7 +38914,6 @@ var ts;
|
|
|
38892
38914
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
38893
38915
|
paramType: ts.Diagnostics.FILE,
|
|
38894
38916
|
transpileOptionValue: undefined,
|
|
38895
|
-
defaultValueDescription: "n/a",
|
|
38896
38917
|
description: ts.Diagnostics.Deprecated_setting_Use_outFile_instead,
|
|
38897
38918
|
},
|
|
38898
38919
|
{
|
|
@@ -38973,6 +38994,7 @@ var ts;
|
|
|
38973
38994
|
affectsEmit: true,
|
|
38974
38995
|
category: ts.Diagnostics.Emit,
|
|
38975
38996
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
38997
|
+
defaultValueDescription: "false",
|
|
38976
38998
|
},
|
|
38977
38999
|
{
|
|
38978
39000
|
name: "disableSizeLimit",
|
|
@@ -38987,21 +39009,24 @@ var ts;
|
|
|
38987
39009
|
type: "boolean",
|
|
38988
39010
|
isTSConfigOnly: true,
|
|
38989
39011
|
category: ts.Diagnostics.Projects,
|
|
38990
|
-
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects
|
|
39012
|
+
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39013
|
+
defaultValueDescription: "false",
|
|
38991
39014
|
},
|
|
38992
39015
|
{
|
|
38993
39016
|
name: "disableSolutionSearching",
|
|
38994
39017
|
type: "boolean",
|
|
38995
39018
|
isTSConfigOnly: true,
|
|
38996
39019
|
category: ts.Diagnostics.Projects,
|
|
38997
|
-
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing
|
|
39020
|
+
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39021
|
+
defaultValueDescription: "false",
|
|
38998
39022
|
},
|
|
38999
39023
|
{
|
|
39000
39024
|
name: "disableReferencedProjectLoad",
|
|
39001
39025
|
type: "boolean",
|
|
39002
39026
|
isTSConfigOnly: true,
|
|
39003
39027
|
category: ts.Diagnostics.Projects,
|
|
39004
|
-
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript
|
|
39028
|
+
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39029
|
+
defaultValueDescription: "false",
|
|
39005
39030
|
},
|
|
39006
39031
|
{
|
|
39007
39032
|
name: "noImplicitUseStrict",
|
|
@@ -39034,7 +39059,7 @@ var ts;
|
|
|
39034
39059
|
affectsEmit: true,
|
|
39035
39060
|
category: ts.Diagnostics.Emit,
|
|
39036
39061
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39037
|
-
defaultValueDescription: "
|
|
39062
|
+
defaultValueDescription: "false",
|
|
39038
39063
|
},
|
|
39039
39064
|
{
|
|
39040
39065
|
name: "declarationDir",
|
|
@@ -39045,7 +39070,6 @@ var ts;
|
|
|
39045
39070
|
category: ts.Diagnostics.Emit,
|
|
39046
39071
|
transpileOptionValue: undefined,
|
|
39047
39072
|
description: ts.Diagnostics.Specify_the_output_directory_for_generated_declaration_files,
|
|
39048
|
-
defaultValueDescription: "n/a"
|
|
39049
39073
|
},
|
|
39050
39074
|
{
|
|
39051
39075
|
name: "skipLibCheck",
|
|
@@ -39127,6 +39151,7 @@ var ts;
|
|
|
39127
39151
|
affectsEmit: true,
|
|
39128
39152
|
category: ts.Diagnostics.Emit,
|
|
39129
39153
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39154
|
+
defaultValueDescription: "false",
|
|
39130
39155
|
},
|
|
39131
39156
|
{
|
|
39132
39157
|
name: "keyofStringsOnly",
|
|
@@ -39174,27 +39199,31 @@ var ts;
|
|
|
39174
39199
|
shortName: "v",
|
|
39175
39200
|
category: ts.Diagnostics.Command_line_Options,
|
|
39176
39201
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39177
|
-
type: "boolean"
|
|
39202
|
+
type: "boolean",
|
|
39203
|
+
defaultValueDescription: "false",
|
|
39178
39204
|
},
|
|
39179
39205
|
{
|
|
39180
39206
|
name: "dry",
|
|
39181
39207
|
shortName: "d",
|
|
39182
39208
|
category: ts.Diagnostics.Command_line_Options,
|
|
39183
39209
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39184
|
-
type: "boolean"
|
|
39210
|
+
type: "boolean",
|
|
39211
|
+
defaultValueDescription: "false",
|
|
39185
39212
|
},
|
|
39186
39213
|
{
|
|
39187
39214
|
name: "force",
|
|
39188
39215
|
shortName: "f",
|
|
39189
39216
|
category: ts.Diagnostics.Command_line_Options,
|
|
39190
39217
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39191
|
-
type: "boolean"
|
|
39218
|
+
type: "boolean",
|
|
39219
|
+
defaultValueDescription: "false",
|
|
39192
39220
|
},
|
|
39193
39221
|
{
|
|
39194
39222
|
name: "clean",
|
|
39195
39223
|
category: ts.Diagnostics.Command_line_Options,
|
|
39196
39224
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39197
|
-
type: "boolean"
|
|
39225
|
+
type: "boolean",
|
|
39226
|
+
defaultValueDescription: "false",
|
|
39198
39227
|
}
|
|
39199
39228
|
];
|
|
39200
39229
|
/* @internal */
|
|
@@ -39207,10 +39236,12 @@ var ts;
|
|
|
39207
39236
|
*/
|
|
39208
39237
|
name: "enableAutoDiscovery",
|
|
39209
39238
|
type: "boolean",
|
|
39239
|
+
defaultValueDescription: "false",
|
|
39210
39240
|
},
|
|
39211
39241
|
{
|
|
39212
39242
|
name: "enable",
|
|
39213
39243
|
type: "boolean",
|
|
39244
|
+
defaultValueDescription: "false",
|
|
39214
39245
|
},
|
|
39215
39246
|
{
|
|
39216
39247
|
name: "include",
|
|
@@ -39231,6 +39262,7 @@ var ts;
|
|
|
39231
39262
|
{
|
|
39232
39263
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39233
39264
|
type: "boolean",
|
|
39265
|
+
defaultValueDescription: "false",
|
|
39234
39266
|
},
|
|
39235
39267
|
];
|
|
39236
39268
|
/*@internal*/
|
|
@@ -50923,7 +50955,7 @@ var ts;
|
|
|
50923
50955
|
var typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode);
|
|
50924
50956
|
var nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type), context) : undefined;
|
|
50925
50957
|
var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4 /* IncludeOptional */)), context);
|
|
50926
|
-
var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode);
|
|
50958
|
+
var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, /*members*/ undefined);
|
|
50927
50959
|
context.approximateLength += 10;
|
|
50928
50960
|
return ts.setEmitFlags(mappedTypeNode, 1 /* SingleLine */);
|
|
50929
50961
|
}
|
|
@@ -66997,17 +67029,16 @@ var ts;
|
|
|
66997
67029
|
var inferredType = void 0;
|
|
66998
67030
|
var signature = context.signature;
|
|
66999
67031
|
if (signature) {
|
|
67000
|
-
var
|
|
67032
|
+
var inferredCovariantType_1 = inference.candidates ? getCovariantInference(inference, signature) : undefined;
|
|
67001
67033
|
if (inference.contraCandidates) {
|
|
67002
|
-
var inferredContravariantType = getContravariantInference(inference);
|
|
67003
67034
|
// If we have both co- and contra-variant inferences, we prefer the contra-variant inference
|
|
67004
|
-
// unless the co-variant inference is a subtype and not 'never'.
|
|
67005
|
-
inferredType =
|
|
67006
|
-
isTypeSubtypeOf(
|
|
67007
|
-
|
|
67035
|
+
// unless the co-variant inference is a subtype of some contra-variant inference and not 'never'.
|
|
67036
|
+
inferredType = inferredCovariantType_1 && !(inferredCovariantType_1.flags & 131072 /* Never */) &&
|
|
67037
|
+
ts.some(inference.contraCandidates, function (t) { return isTypeSubtypeOf(inferredCovariantType_1, t); }) ?
|
|
67038
|
+
inferredCovariantType_1 : getContravariantInference(inference);
|
|
67008
67039
|
}
|
|
67009
|
-
else if (
|
|
67010
|
-
inferredType =
|
|
67040
|
+
else if (inferredCovariantType_1) {
|
|
67041
|
+
inferredType = inferredCovariantType_1;
|
|
67011
67042
|
}
|
|
67012
67043
|
else if (context.flags & 1 /* NoDefault */) {
|
|
67013
67044
|
// We use silentNeverType as the wildcard that signals no inferences.
|
|
@@ -71131,6 +71162,10 @@ var ts;
|
|
|
71131
71162
|
function checkComputedPropertyName(node) {
|
|
71132
71163
|
var links = getNodeLinks(node.expression);
|
|
71133
71164
|
if (!links.resolvedType) {
|
|
71165
|
+
if ((ts.isTypeLiteralNode(node.parent.parent) || ts.isClassLike(node.parent.parent) || ts.isInterfaceDeclaration(node.parent.parent))
|
|
71166
|
+
&& ts.isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101 /* InKeyword */) {
|
|
71167
|
+
return links.resolvedType = errorType;
|
|
71168
|
+
}
|
|
71134
71169
|
links.resolvedType = checkExpression(node.expression);
|
|
71135
71170
|
// The computed property name of a non-static class field within a loop must be stored in a block-scoped binding.
|
|
71136
71171
|
// (It needs to be bound at class evaluation time.)
|
|
@@ -78280,6 +78315,7 @@ var ts;
|
|
|
78280
78315
|
checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
|
|
78281
78316
|
}
|
|
78282
78317
|
function checkMappedType(node) {
|
|
78318
|
+
checkGrammarMappedType(node);
|
|
78283
78319
|
checkSourceElement(node.typeParameter);
|
|
78284
78320
|
checkSourceElement(node.nameType);
|
|
78285
78321
|
checkSourceElement(node.type);
|
|
@@ -78296,6 +78332,12 @@ var ts;
|
|
|
78296
78332
|
checkTypeAssignableTo(constraintType, keyofConstraintType, ts.getEffectiveConstraintOfTypeParameter(node.typeParameter));
|
|
78297
78333
|
}
|
|
78298
78334
|
}
|
|
78335
|
+
function checkGrammarMappedType(node) {
|
|
78336
|
+
var _a;
|
|
78337
|
+
if ((_a = node.members) === null || _a === void 0 ? void 0 : _a.length) {
|
|
78338
|
+
return grammarErrorOnNode(node.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
|
|
78339
|
+
}
|
|
78340
|
+
}
|
|
78299
78341
|
function checkThisType(node) {
|
|
78300
78342
|
getTypeFromThisTypeNode(node);
|
|
78301
78343
|
}
|
|
@@ -86159,6 +86201,9 @@ var ts;
|
|
|
86159
86201
|
}
|
|
86160
86202
|
}
|
|
86161
86203
|
function checkGrammarProperty(node) {
|
|
86204
|
+
if (ts.isComputedPropertyName(node.name) && ts.isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101 /* InKeyword */) {
|
|
86205
|
+
return grammarErrorOnNode(node.parent.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
|
|
86206
|
+
}
|
|
86162
86207
|
if (ts.isClassLike(node.parent)) {
|
|
86163
86208
|
if (ts.isStringLiteral(node.name) && node.name.text === "constructor") {
|
|
86164
86209
|
return grammarErrorOnNode(node.name, ts.Diagnostics.Classes_may_not_have_a_field_named_constructor);
|
|
@@ -86178,7 +86223,7 @@ var ts;
|
|
|
86178
86223
|
return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
|
|
86179
86224
|
}
|
|
86180
86225
|
}
|
|
86181
|
-
else if (node.parent
|
|
86226
|
+
else if (ts.isTypeLiteralNode(node.parent)) {
|
|
86182
86227
|
if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
|
|
86183
86228
|
return true;
|
|
86184
86229
|
}
|
|
@@ -86855,7 +86900,7 @@ var ts;
|
|
|
86855
86900
|
return factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
|
|
86856
86901
|
case 194 /* MappedType */:
|
|
86857
86902
|
ts.Debug.type(node);
|
|
86858
|
-
return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
86903
|
+
return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
86859
86904
|
case 195 /* LiteralType */:
|
|
86860
86905
|
ts.Debug.type(node);
|
|
86861
86906
|
return factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "此处不允许使用 'A 标签。",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "标记的元组元素被声明为可选,并且问号位于名称之后、冒号之前,而不是位于类型之后。",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "标记的元组元素通过在名称之前(而不是类型之前)的 “...” 声明为 rest。",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "映射的类型可能不声明属性或方法。",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "枚举声明中的成员初始化表达式不能引用在其后声明的成员(包括在其他枚举中定义的成员)。",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin 类必须具有单个 rest 参数为类型 \"any[]\" 的构造函数。",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "从包含抽象构造签名的类型变量扩展的 mixin 类也必须声明为 \"abstract\"。",
|
|
@@ -437,7 +438,7 @@
|
|
|
437
438
|
"Convert_overload_list_to_single_signature_95118": "将重载列表转换为单一签名",
|
|
438
439
|
"Convert_parameters_to_destructured_object_95075": "将参数转换为析构对象",
|
|
439
440
|
"Convert_require_to_import_95047": "将 \"require\" 转换为 \"import\"",
|
|
440
|
-
"
|
|
441
|
+
"Convert_to_ES_module_95017": "转换为 ES 模块",
|
|
441
442
|
"Convert_to_a_bigint_numeric_literal_95091": "转换为 bigint 数字文本",
|
|
442
443
|
"Convert_to_anonymous_function_95123": "转换为异步函数",
|
|
443
444
|
"Convert_to_arrow_function_95125": "转换为箭头函数",
|
|
@@ -681,7 +682,7 @@
|
|
|
681
682
|
"File_0_not_found_6053": "找不到文件“{0}”。",
|
|
682
683
|
"File_Management_6245": "文件管理",
|
|
683
684
|
"File_change_detected_Starting_incremental_compilation_6032": "检测到文件更改。正在启动增量编译...",
|
|
684
|
-
"
|
|
685
|
+
"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001": "文件是 CommonJS 模块; 它可能会转换为 ES 模块。",
|
|
685
686
|
"File_is_default_library_for_target_specified_here_1426": "文件是此处指定的目标的默认库。",
|
|
686
687
|
"File_is_entry_point_of_type_library_specified_here_1419": "文件是此处指定的类型库的入口点。",
|
|
687
688
|
"File_is_included_via_import_here_1399": "在此处通过导入包含了文件。",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"A_label_is_not_allowed_here_1344": "此處不允許標籤。",
|
|
48
48
|
"A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086": "標記的元組元素已宣告為選用,並在名稱之後、冒號之前加上問號,而非加在類型之後。",
|
|
49
49
|
"A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087": "標記的元組元素已宣告為待用,並在名稱之前加上「...」,而非加在類型之前。",
|
|
50
|
+
"A_mapped_type_may_not_declare_properties_or_methods_7061": "對應型別不能宣告屬性或方法。",
|
|
50
51
|
"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651": "列舉宣告中的成員初始設定式,不得參考在它之後宣告的成員,包括在其他列舉中所定義的成員。",
|
|
51
52
|
"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545": "mixin 類別必須具備建構函式,且該建構函式必須指定一個類型為 'any[]' 的 rest 參數。",
|
|
52
53
|
"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797": "從包含抽象建構簽章之類型變數所延伸的 mixin 類別也必須宣告為 'abstract'。",
|
|
@@ -437,7 +438,7 @@
|
|
|
437
438
|
"Convert_overload_list_to_single_signature_95118": "將多載清單轉換成單一特徵標記",
|
|
438
439
|
"Convert_parameters_to_destructured_object_95075": "將參數轉換為解構的物件",
|
|
439
440
|
"Convert_require_to_import_95047": "將 'require' 轉換至 'import'",
|
|
440
|
-
"
|
|
441
|
+
"Convert_to_ES_module_95017": "轉換為 ES 模組",
|
|
441
442
|
"Convert_to_a_bigint_numeric_literal_95091": "轉換為 Bigint 數字常值",
|
|
442
443
|
"Convert_to_anonymous_function_95123": "轉換為匿名函式",
|
|
443
444
|
"Convert_to_arrow_function_95125": "轉換為箭頭函式",
|
|
@@ -681,7 +682,7 @@
|
|
|
681
682
|
"File_0_not_found_6053": "找不到檔案 '{0}'。",
|
|
682
683
|
"File_Management_6245": "檔案管理",
|
|
683
684
|
"File_change_detected_Starting_incremental_compilation_6032": "偵測到檔案變更。正在啟動累加編譯...",
|
|
684
|
-
"
|
|
685
|
+
"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001": "檔案為 CommonJS 模組; 其可轉換為 ES 模組。",
|
|
685
686
|
"File_is_default_library_for_target_specified_here_1426": "檔案是此處指定目標的預設程式庫。",
|
|
686
687
|
"File_is_entry_point_of_type_library_specified_here_1419": "檔案是此處指定型別程式庫的進入點。",
|
|
687
688
|
"File_is_included_via_import_here_1399": "檔案透過匯入加入此處。",
|
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.5.0-dev.
|
|
5
|
+
"version": "4.5.0-dev.20211021",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|