typescript 4.6.0-dev.20211201 → 4.6.0-dev.20211205
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 +172 -122
- package/lib/tsserver.js +200 -134
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +200 -134
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +198 -132
- package/lib/typescriptServices.d.ts +2 -0
- package/lib/typescriptServices.js +198 -132
- package/lib/typingsInstaller.js +153 -124
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211205";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -843,7 +843,11 @@ var ts;
|
|
|
843
843
|
}
|
|
844
844
|
return deduplicated;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function createSortedArray() {
|
|
847
|
+
return []; // TODO: GH#19873
|
|
848
|
+
}
|
|
849
|
+
ts.createSortedArray = createSortedArray;
|
|
850
|
+
function insertSorted(array, insert, compare, allowDuplicates) {
|
|
847
851
|
if (array.length === 0) {
|
|
848
852
|
array.push(insert);
|
|
849
853
|
return;
|
|
@@ -852,6 +856,9 @@ var ts;
|
|
|
852
856
|
if (insertIndex < 0) {
|
|
853
857
|
array.splice(~insertIndex, 0, insert);
|
|
854
858
|
}
|
|
859
|
+
else if (allowDuplicates) {
|
|
860
|
+
array.splice(insertIndex, 0, insert);
|
|
861
|
+
}
|
|
855
862
|
}
|
|
856
863
|
ts.insertSorted = insertSorted;
|
|
857
864
|
function sortAndDeduplicate(array, comparer, equalityComparer) {
|
|
@@ -8217,6 +8224,7 @@ var ts;
|
|
|
8217
8224
|
Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, ts.DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),
|
|
8218
8225
|
An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, ts.DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."),
|
|
8219
8226
|
Type_0_recursively_references_itself_as_a_base_type: diag(2310, ts.DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."),
|
|
8227
|
+
Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"),
|
|
8220
8228
|
An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, ts.DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."),
|
|
8221
8229
|
Type_parameter_0_has_a_circular_constraint: diag(2313, ts.DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."),
|
|
8222
8230
|
Generic_type_0_requires_1_type_argument_s: diag(2314, ts.DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."),
|
|
@@ -20758,6 +20766,10 @@ var ts;
|
|
|
20758
20766
|
return text.replace(/\$/gm, "\\$");
|
|
20759
20767
|
}
|
|
20760
20768
|
ts.escapeSnippetText = escapeSnippetText;
|
|
20769
|
+
function isThisTypeParameter(type) {
|
|
20770
|
+
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
20771
|
+
}
|
|
20772
|
+
ts.isThisTypeParameter = isThisTypeParameter;
|
|
20761
20773
|
})(ts || (ts = {}));
|
|
20762
20774
|
/* @internal */
|
|
20763
20775
|
var ts;
|
|
@@ -38010,7 +38022,11 @@ var ts;
|
|
|
38010
38022
|
var ts;
|
|
38011
38023
|
(function (ts) {
|
|
38012
38024
|
/* @internal */
|
|
38013
|
-
ts.compileOnSaveCommandLineOption = {
|
|
38025
|
+
ts.compileOnSaveCommandLineOption = {
|
|
38026
|
+
name: "compileOnSave",
|
|
38027
|
+
type: "boolean",
|
|
38028
|
+
defaultValueDescription: false,
|
|
38029
|
+
};
|
|
38014
38030
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
38015
38031
|
"preserve": 1 /* Preserve */,
|
|
38016
38032
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38124,6 +38140,7 @@ var ts;
|
|
|
38124
38140
|
})),
|
|
38125
38141
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38126
38142
|
description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
38143
|
+
defaultValueDescription: ts.WatchFileKind.UseFsEvents,
|
|
38127
38144
|
},
|
|
38128
38145
|
{
|
|
38129
38146
|
name: "watchDirectory",
|
|
@@ -38135,6 +38152,7 @@ var ts;
|
|
|
38135
38152
|
})),
|
|
38136
38153
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38137
38154
|
description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
38155
|
+
defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
|
|
38138
38156
|
},
|
|
38139
38157
|
{
|
|
38140
38158
|
name: "fallbackPolling",
|
|
@@ -38146,13 +38164,14 @@ var ts;
|
|
|
38146
38164
|
})),
|
|
38147
38165
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38148
38166
|
description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
|
|
38167
|
+
defaultValueDescription: ts.PollingWatchKind.PriorityInterval,
|
|
38149
38168
|
},
|
|
38150
38169
|
{
|
|
38151
38170
|
name: "synchronousWatchDirectory",
|
|
38152
38171
|
type: "boolean",
|
|
38153
38172
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38154
38173
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38155
|
-
defaultValueDescription:
|
|
38174
|
+
defaultValueDescription: false,
|
|
38156
38175
|
},
|
|
38157
38176
|
{
|
|
38158
38177
|
name: "excludeDirectories",
|
|
@@ -38188,13 +38207,13 @@ var ts;
|
|
|
38188
38207
|
showInSimplifiedHelpView: true,
|
|
38189
38208
|
category: ts.Diagnostics.Command_line_Options,
|
|
38190
38209
|
description: ts.Diagnostics.Print_this_message,
|
|
38191
|
-
defaultValueDescription:
|
|
38210
|
+
defaultValueDescription: false,
|
|
38192
38211
|
},
|
|
38193
38212
|
{
|
|
38194
38213
|
name: "help",
|
|
38195
38214
|
shortName: "?",
|
|
38196
38215
|
type: "boolean",
|
|
38197
|
-
defaultValueDescription:
|
|
38216
|
+
defaultValueDescription: false,
|
|
38198
38217
|
},
|
|
38199
38218
|
{
|
|
38200
38219
|
name: "watch",
|
|
@@ -38204,7 +38223,7 @@ var ts;
|
|
|
38204
38223
|
isCommandLineOnly: true,
|
|
38205
38224
|
category: ts.Diagnostics.Command_line_Options,
|
|
38206
38225
|
description: ts.Diagnostics.Watch_input_files,
|
|
38207
|
-
defaultValueDescription:
|
|
38226
|
+
defaultValueDescription: false,
|
|
38208
38227
|
},
|
|
38209
38228
|
{
|
|
38210
38229
|
name: "preserveWatchOutput",
|
|
@@ -38212,28 +38231,28 @@ var ts;
|
|
|
38212
38231
|
showInSimplifiedHelpView: false,
|
|
38213
38232
|
category: ts.Diagnostics.Output_Formatting,
|
|
38214
38233
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38215
|
-
defaultValueDescription:
|
|
38234
|
+
defaultValueDescription: false,
|
|
38216
38235
|
},
|
|
38217
38236
|
{
|
|
38218
38237
|
name: "listFiles",
|
|
38219
38238
|
type: "boolean",
|
|
38220
38239
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38221
38240
|
description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
|
|
38222
|
-
defaultValueDescription:
|
|
38241
|
+
defaultValueDescription: false,
|
|
38223
38242
|
},
|
|
38224
38243
|
{
|
|
38225
38244
|
name: "explainFiles",
|
|
38226
38245
|
type: "boolean",
|
|
38227
38246
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38228
38247
|
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38229
|
-
defaultValueDescription:
|
|
38248
|
+
defaultValueDescription: false,
|
|
38230
38249
|
},
|
|
38231
38250
|
{
|
|
38232
38251
|
name: "listEmittedFiles",
|
|
38233
38252
|
type: "boolean",
|
|
38234
38253
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38235
38254
|
description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
|
|
38236
|
-
defaultValueDescription:
|
|
38255
|
+
defaultValueDescription: false,
|
|
38237
38256
|
},
|
|
38238
38257
|
{
|
|
38239
38258
|
name: "pretty",
|
|
@@ -38241,28 +38260,28 @@ var ts;
|
|
|
38241
38260
|
showInSimplifiedHelpView: true,
|
|
38242
38261
|
category: ts.Diagnostics.Output_Formatting,
|
|
38243
38262
|
description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
|
|
38244
|
-
defaultValueDescription:
|
|
38263
|
+
defaultValueDescription: true,
|
|
38245
38264
|
},
|
|
38246
38265
|
{
|
|
38247
38266
|
name: "traceResolution",
|
|
38248
38267
|
type: "boolean",
|
|
38249
38268
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38250
38269
|
description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
|
|
38251
|
-
defaultValueDescription:
|
|
38270
|
+
defaultValueDescription: false,
|
|
38252
38271
|
},
|
|
38253
38272
|
{
|
|
38254
38273
|
name: "diagnostics",
|
|
38255
38274
|
type: "boolean",
|
|
38256
38275
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38257
38276
|
description: ts.Diagnostics.Output_compiler_performance_information_after_building,
|
|
38258
|
-
defaultValueDescription:
|
|
38277
|
+
defaultValueDescription: false,
|
|
38259
38278
|
},
|
|
38260
38279
|
{
|
|
38261
38280
|
name: "extendedDiagnostics",
|
|
38262
38281
|
type: "boolean",
|
|
38263
38282
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38264
38283
|
description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
|
|
38265
|
-
defaultValueDescription:
|
|
38284
|
+
defaultValueDescription: false,
|
|
38266
38285
|
},
|
|
38267
38286
|
{
|
|
38268
38287
|
name: "generateCpuProfile",
|
|
@@ -38298,7 +38317,7 @@ var ts;
|
|
|
38298
38317
|
affectsEmit: true,
|
|
38299
38318
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38300
38319
|
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,
|
|
38301
|
-
defaultValueDescription:
|
|
38320
|
+
defaultValueDescription: false,
|
|
38302
38321
|
},
|
|
38303
38322
|
{
|
|
38304
38323
|
name: "locale",
|
|
@@ -38334,7 +38353,7 @@ var ts;
|
|
|
38334
38353
|
showInSimplifiedHelpView: true,
|
|
38335
38354
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38336
38355
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38337
|
-
defaultValueDescription:
|
|
38356
|
+
defaultValueDescription: 0 /* ES3 */,
|
|
38338
38357
|
};
|
|
38339
38358
|
var commandOptionsWithoutBuild = [
|
|
38340
38359
|
// CommandLine only options
|
|
@@ -38344,7 +38363,7 @@ var ts;
|
|
|
38344
38363
|
showInSimplifiedHelpView: true,
|
|
38345
38364
|
category: ts.Diagnostics.Command_line_Options,
|
|
38346
38365
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38347
|
-
defaultValueDescription:
|
|
38366
|
+
defaultValueDescription: false,
|
|
38348
38367
|
},
|
|
38349
38368
|
{
|
|
38350
38369
|
name: "version",
|
|
@@ -38353,7 +38372,7 @@ var ts;
|
|
|
38353
38372
|
showInSimplifiedHelpView: true,
|
|
38354
38373
|
category: ts.Diagnostics.Command_line_Options,
|
|
38355
38374
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38356
|
-
defaultValueDescription:
|
|
38375
|
+
defaultValueDescription: false,
|
|
38357
38376
|
},
|
|
38358
38377
|
{
|
|
38359
38378
|
name: "init",
|
|
@@ -38361,7 +38380,7 @@ var ts;
|
|
|
38361
38380
|
showInSimplifiedHelpView: true,
|
|
38362
38381
|
category: ts.Diagnostics.Command_line_Options,
|
|
38363
38382
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38364
|
-
defaultValueDescription:
|
|
38383
|
+
defaultValueDescription: false,
|
|
38365
38384
|
},
|
|
38366
38385
|
{
|
|
38367
38386
|
name: "project",
|
|
@@ -38380,7 +38399,7 @@ var ts;
|
|
|
38380
38399
|
showInSimplifiedHelpView: true,
|
|
38381
38400
|
category: ts.Diagnostics.Command_line_Options,
|
|
38382
38401
|
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38383
|
-
defaultValueDescription:
|
|
38402
|
+
defaultValueDescription: false,
|
|
38384
38403
|
},
|
|
38385
38404
|
{
|
|
38386
38405
|
name: "showConfig",
|
|
@@ -38389,7 +38408,7 @@ var ts;
|
|
|
38389
38408
|
category: ts.Diagnostics.Command_line_Options,
|
|
38390
38409
|
isCommandLineOnly: true,
|
|
38391
38410
|
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38392
|
-
defaultValueDescription:
|
|
38411
|
+
defaultValueDescription: false,
|
|
38393
38412
|
},
|
|
38394
38413
|
{
|
|
38395
38414
|
name: "listFilesOnly",
|
|
@@ -38399,7 +38418,7 @@ var ts;
|
|
|
38399
38418
|
affectsEmit: true,
|
|
38400
38419
|
isCommandLineOnly: true,
|
|
38401
38420
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38402
|
-
defaultValueDescription:
|
|
38421
|
+
defaultValueDescription: false,
|
|
38403
38422
|
},
|
|
38404
38423
|
// Basic
|
|
38405
38424
|
ts.targetOptionDeclaration,
|
|
@@ -38426,13 +38445,15 @@ var ts;
|
|
|
38426
38445
|
showInSimplifiedHelpView: true,
|
|
38427
38446
|
category: ts.Diagnostics.Modules,
|
|
38428
38447
|
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
38448
|
+
defaultValueDescription: undefined,
|
|
38429
38449
|
},
|
|
38430
38450
|
{
|
|
38431
38451
|
name: "lib",
|
|
38432
38452
|
type: "list",
|
|
38433
38453
|
element: {
|
|
38434
38454
|
name: "lib",
|
|
38435
|
-
type: ts.libMap
|
|
38455
|
+
type: ts.libMap,
|
|
38456
|
+
defaultValueDescription: undefined,
|
|
38436
38457
|
},
|
|
38437
38458
|
affectsProgramStructure: true,
|
|
38438
38459
|
showInSimplifiedHelpView: true,
|
|
@@ -38447,7 +38468,7 @@ var ts;
|
|
|
38447
38468
|
showInSimplifiedHelpView: true,
|
|
38448
38469
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38449
38470
|
description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
38450
|
-
defaultValueDescription:
|
|
38471
|
+
defaultValueDescription: false,
|
|
38451
38472
|
},
|
|
38452
38473
|
{
|
|
38453
38474
|
name: "checkJs",
|
|
@@ -38455,7 +38476,7 @@ var ts;
|
|
|
38455
38476
|
showInSimplifiedHelpView: true,
|
|
38456
38477
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38457
38478
|
description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
38458
|
-
defaultValueDescription:
|
|
38479
|
+
defaultValueDescription: false,
|
|
38459
38480
|
},
|
|
38460
38481
|
{
|
|
38461
38482
|
name: "jsx",
|
|
@@ -38467,7 +38488,7 @@ var ts;
|
|
|
38467
38488
|
showInSimplifiedHelpView: true,
|
|
38468
38489
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38469
38490
|
description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
|
|
38470
|
-
defaultValueDescription:
|
|
38491
|
+
defaultValueDescription: undefined,
|
|
38471
38492
|
},
|
|
38472
38493
|
{
|
|
38473
38494
|
name: "declaration",
|
|
@@ -38487,7 +38508,7 @@ var ts;
|
|
|
38487
38508
|
showInSimplifiedHelpView: true,
|
|
38488
38509
|
category: ts.Diagnostics.Emit,
|
|
38489
38510
|
transpileOptionValue: undefined,
|
|
38490
|
-
defaultValueDescription:
|
|
38511
|
+
defaultValueDescription: false,
|
|
38491
38512
|
description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
38492
38513
|
},
|
|
38493
38514
|
{
|
|
@@ -38498,7 +38519,7 @@ var ts;
|
|
|
38498
38519
|
category: ts.Diagnostics.Emit,
|
|
38499
38520
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
38500
38521
|
transpileOptionValue: undefined,
|
|
38501
|
-
defaultValueDescription:
|
|
38522
|
+
defaultValueDescription: false,
|
|
38502
38523
|
},
|
|
38503
38524
|
{
|
|
38504
38525
|
name: "sourceMap",
|
|
@@ -38506,7 +38527,7 @@ var ts;
|
|
|
38506
38527
|
affectsEmit: true,
|
|
38507
38528
|
showInSimplifiedHelpView: true,
|
|
38508
38529
|
category: ts.Diagnostics.Emit,
|
|
38509
|
-
defaultValueDescription:
|
|
38530
|
+
defaultValueDescription: false,
|
|
38510
38531
|
description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
|
|
38511
38532
|
},
|
|
38512
38533
|
{
|
|
@@ -38547,7 +38568,7 @@ var ts;
|
|
|
38547
38568
|
isTSConfigOnly: true,
|
|
38548
38569
|
category: ts.Diagnostics.Projects,
|
|
38549
38570
|
transpileOptionValue: undefined,
|
|
38550
|
-
defaultValueDescription:
|
|
38571
|
+
defaultValueDescription: false,
|
|
38551
38572
|
description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
|
|
38552
38573
|
},
|
|
38553
38574
|
{
|
|
@@ -38567,7 +38588,7 @@ var ts;
|
|
|
38567
38588
|
affectsEmit: true,
|
|
38568
38589
|
showInSimplifiedHelpView: true,
|
|
38569
38590
|
category: ts.Diagnostics.Emit,
|
|
38570
|
-
defaultValueDescription:
|
|
38591
|
+
defaultValueDescription: false,
|
|
38571
38592
|
description: ts.Diagnostics.Disable_emitting_comments,
|
|
38572
38593
|
},
|
|
38573
38594
|
{
|
|
@@ -38577,7 +38598,7 @@ var ts;
|
|
|
38577
38598
|
category: ts.Diagnostics.Emit,
|
|
38578
38599
|
description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
|
|
38579
38600
|
transpileOptionValue: undefined,
|
|
38580
|
-
defaultValueDescription:
|
|
38601
|
+
defaultValueDescription: false,
|
|
38581
38602
|
},
|
|
38582
38603
|
{
|
|
38583
38604
|
name: "importHelpers",
|
|
@@ -38585,7 +38606,7 @@ var ts;
|
|
|
38585
38606
|
affectsEmit: true,
|
|
38586
38607
|
category: ts.Diagnostics.Emit,
|
|
38587
38608
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
38588
|
-
defaultValueDescription:
|
|
38609
|
+
defaultValueDescription: false,
|
|
38589
38610
|
},
|
|
38590
38611
|
{
|
|
38591
38612
|
name: "importsNotUsedAsValues",
|
|
@@ -38597,7 +38618,8 @@ var ts;
|
|
|
38597
38618
|
affectsEmit: true,
|
|
38598
38619
|
affectsSemanticDiagnostics: true,
|
|
38599
38620
|
category: ts.Diagnostics.Emit,
|
|
38600
|
-
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
|
|
38621
|
+
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
38622
|
+
defaultValueDescription: 0 /* Remove */,
|
|
38601
38623
|
},
|
|
38602
38624
|
{
|
|
38603
38625
|
name: "downlevelIteration",
|
|
@@ -38605,7 +38627,7 @@ var ts;
|
|
|
38605
38627
|
affectsEmit: true,
|
|
38606
38628
|
category: ts.Diagnostics.Emit,
|
|
38607
38629
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
38608
|
-
defaultValueDescription:
|
|
38630
|
+
defaultValueDescription: false,
|
|
38609
38631
|
},
|
|
38610
38632
|
{
|
|
38611
38633
|
name: "isolatedModules",
|
|
@@ -38613,7 +38635,7 @@ var ts;
|
|
|
38613
38635
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38614
38636
|
description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
|
|
38615
38637
|
transpileOptionValue: true,
|
|
38616
|
-
defaultValueDescription:
|
|
38638
|
+
defaultValueDescription: false,
|
|
38617
38639
|
},
|
|
38618
38640
|
// Strict Type Checks
|
|
38619
38641
|
{
|
|
@@ -38624,7 +38646,7 @@ var ts;
|
|
|
38624
38646
|
showInSimplifiedHelpView: true,
|
|
38625
38647
|
category: ts.Diagnostics.Type_Checking,
|
|
38626
38648
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
38627
|
-
defaultValueDescription:
|
|
38649
|
+
defaultValueDescription: false,
|
|
38628
38650
|
},
|
|
38629
38651
|
{
|
|
38630
38652
|
name: "noImplicitAny",
|
|
@@ -38685,7 +38707,7 @@ var ts;
|
|
|
38685
38707
|
strictFlag: true,
|
|
38686
38708
|
category: ts.Diagnostics.Type_Checking,
|
|
38687
38709
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38688
|
-
defaultValueDescription:
|
|
38710
|
+
defaultValueDescription: false,
|
|
38689
38711
|
},
|
|
38690
38712
|
{
|
|
38691
38713
|
name: "alwaysStrict",
|
|
@@ -38703,7 +38725,7 @@ var ts;
|
|
|
38703
38725
|
affectsSemanticDiagnostics: true,
|
|
38704
38726
|
category: ts.Diagnostics.Type_Checking,
|
|
38705
38727
|
description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
|
|
38706
|
-
defaultValueDescription:
|
|
38728
|
+
defaultValueDescription: false,
|
|
38707
38729
|
},
|
|
38708
38730
|
{
|
|
38709
38731
|
name: "noUnusedParameters",
|
|
@@ -38711,7 +38733,7 @@ var ts;
|
|
|
38711
38733
|
affectsSemanticDiagnostics: true,
|
|
38712
38734
|
category: ts.Diagnostics.Type_Checking,
|
|
38713
38735
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
38714
|
-
defaultValueDescription:
|
|
38736
|
+
defaultValueDescription: false,
|
|
38715
38737
|
},
|
|
38716
38738
|
{
|
|
38717
38739
|
name: "exactOptionalPropertyTypes",
|
|
@@ -38719,7 +38741,7 @@ var ts;
|
|
|
38719
38741
|
affectsSemanticDiagnostics: true,
|
|
38720
38742
|
category: ts.Diagnostics.Type_Checking,
|
|
38721
38743
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38722
|
-
defaultValueDescription:
|
|
38744
|
+
defaultValueDescription: false,
|
|
38723
38745
|
},
|
|
38724
38746
|
{
|
|
38725
38747
|
name: "noImplicitReturns",
|
|
@@ -38727,7 +38749,7 @@ var ts;
|
|
|
38727
38749
|
affectsSemanticDiagnostics: true,
|
|
38728
38750
|
category: ts.Diagnostics.Type_Checking,
|
|
38729
38751
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
38730
|
-
defaultValueDescription:
|
|
38752
|
+
defaultValueDescription: false,
|
|
38731
38753
|
},
|
|
38732
38754
|
{
|
|
38733
38755
|
name: "noFallthroughCasesInSwitch",
|
|
@@ -38736,7 +38758,7 @@ var ts;
|
|
|
38736
38758
|
affectsSemanticDiagnostics: true,
|
|
38737
38759
|
category: ts.Diagnostics.Type_Checking,
|
|
38738
38760
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38739
|
-
defaultValueDescription:
|
|
38761
|
+
defaultValueDescription: false,
|
|
38740
38762
|
},
|
|
38741
38763
|
{
|
|
38742
38764
|
name: "noUncheckedIndexedAccess",
|
|
@@ -38744,7 +38766,7 @@ var ts;
|
|
|
38744
38766
|
affectsSemanticDiagnostics: true,
|
|
38745
38767
|
category: ts.Diagnostics.Type_Checking,
|
|
38746
38768
|
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38747
|
-
defaultValueDescription:
|
|
38769
|
+
defaultValueDescription: false,
|
|
38748
38770
|
},
|
|
38749
38771
|
{
|
|
38750
38772
|
name: "noImplicitOverride",
|
|
@@ -38752,7 +38774,7 @@ var ts;
|
|
|
38752
38774
|
affectsSemanticDiagnostics: true,
|
|
38753
38775
|
category: ts.Diagnostics.Type_Checking,
|
|
38754
38776
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38755
|
-
defaultValueDescription:
|
|
38777
|
+
defaultValueDescription: false,
|
|
38756
38778
|
},
|
|
38757
38779
|
{
|
|
38758
38780
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38760,7 +38782,7 @@ var ts;
|
|
|
38760
38782
|
showInSimplifiedHelpView: false,
|
|
38761
38783
|
category: ts.Diagnostics.Type_Checking,
|
|
38762
38784
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
38763
|
-
defaultValueDescription:
|
|
38785
|
+
defaultValueDescription: false,
|
|
38764
38786
|
},
|
|
38765
38787
|
// Module Resolution
|
|
38766
38788
|
{
|
|
@@ -38854,14 +38876,14 @@ var ts;
|
|
|
38854
38876
|
showInSimplifiedHelpView: true,
|
|
38855
38877
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38856
38878
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
38857
|
-
defaultValueDescription:
|
|
38879
|
+
defaultValueDescription: false,
|
|
38858
38880
|
},
|
|
38859
38881
|
{
|
|
38860
38882
|
name: "preserveSymlinks",
|
|
38861
38883
|
type: "boolean",
|
|
38862
38884
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38863
38885
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
38864
|
-
defaultValueDescription:
|
|
38886
|
+
defaultValueDescription: false,
|
|
38865
38887
|
},
|
|
38866
38888
|
{
|
|
38867
38889
|
name: "allowUmdGlobalAccess",
|
|
@@ -38869,7 +38891,7 @@ var ts;
|
|
|
38869
38891
|
affectsSemanticDiagnostics: true,
|
|
38870
38892
|
category: ts.Diagnostics.Modules,
|
|
38871
38893
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
38872
|
-
defaultValueDescription:
|
|
38894
|
+
defaultValueDescription: false,
|
|
38873
38895
|
},
|
|
38874
38896
|
// Source Maps
|
|
38875
38897
|
{
|
|
@@ -38894,7 +38916,7 @@ var ts;
|
|
|
38894
38916
|
affectsEmit: true,
|
|
38895
38917
|
category: ts.Diagnostics.Emit,
|
|
38896
38918
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
38897
|
-
defaultValueDescription:
|
|
38919
|
+
defaultValueDescription: false,
|
|
38898
38920
|
},
|
|
38899
38921
|
{
|
|
38900
38922
|
name: "inlineSources",
|
|
@@ -38902,7 +38924,7 @@ var ts;
|
|
|
38902
38924
|
affectsEmit: true,
|
|
38903
38925
|
category: ts.Diagnostics.Emit,
|
|
38904
38926
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
38905
|
-
defaultValueDescription:
|
|
38927
|
+
defaultValueDescription: false,
|
|
38906
38928
|
},
|
|
38907
38929
|
// Experimental
|
|
38908
38930
|
{
|
|
@@ -38911,7 +38933,7 @@ var ts;
|
|
|
38911
38933
|
affectsSemanticDiagnostics: true,
|
|
38912
38934
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38913
38935
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
38914
|
-
defaultValueDescription:
|
|
38936
|
+
defaultValueDescription: false,
|
|
38915
38937
|
},
|
|
38916
38938
|
{
|
|
38917
38939
|
name: "emitDecoratorMetadata",
|
|
@@ -38920,7 +38942,7 @@ var ts;
|
|
|
38920
38942
|
affectsEmit: true,
|
|
38921
38943
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38922
38944
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
38923
|
-
defaultValueDescription:
|
|
38945
|
+
defaultValueDescription: false,
|
|
38924
38946
|
},
|
|
38925
38947
|
// Advanced
|
|
38926
38948
|
{
|
|
@@ -38952,7 +38974,7 @@ var ts;
|
|
|
38952
38974
|
affectsModuleResolution: true,
|
|
38953
38975
|
category: ts.Diagnostics.Modules,
|
|
38954
38976
|
description: ts.Diagnostics.Enable_importing_json_files,
|
|
38955
|
-
defaultValueDescription:
|
|
38977
|
+
defaultValueDescription: false,
|
|
38956
38978
|
},
|
|
38957
38979
|
{
|
|
38958
38980
|
name: "out",
|
|
@@ -38978,7 +39000,7 @@ var ts;
|
|
|
38978
39000
|
type: "boolean",
|
|
38979
39001
|
category: ts.Diagnostics.Completeness,
|
|
38980
39002
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
38981
|
-
defaultValueDescription:
|
|
39003
|
+
defaultValueDescription: false,
|
|
38982
39004
|
},
|
|
38983
39005
|
{
|
|
38984
39006
|
name: "charset",
|
|
@@ -38993,7 +39015,7 @@ var ts;
|
|
|
38993
39015
|
affectsEmit: true,
|
|
38994
39016
|
category: ts.Diagnostics.Emit,
|
|
38995
39017
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
38996
|
-
defaultValueDescription:
|
|
39018
|
+
defaultValueDescription: false,
|
|
38997
39019
|
},
|
|
38998
39020
|
{
|
|
38999
39021
|
name: "newLine",
|
|
@@ -39013,7 +39035,7 @@ var ts;
|
|
|
39013
39035
|
affectsSemanticDiagnostics: true,
|
|
39014
39036
|
category: ts.Diagnostics.Output_Formatting,
|
|
39015
39037
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
39016
|
-
defaultValueDescription:
|
|
39038
|
+
defaultValueDescription: false,
|
|
39017
39039
|
},
|
|
39018
39040
|
{
|
|
39019
39041
|
name: "noLib",
|
|
@@ -39024,7 +39046,7 @@ var ts;
|
|
|
39024
39046
|
// We are not returning a sourceFile for lib file when asked by the program,
|
|
39025
39047
|
// so pass --noLib to avoid reporting a file not found error.
|
|
39026
39048
|
transpileOptionValue: true,
|
|
39027
|
-
defaultValueDescription:
|
|
39049
|
+
defaultValueDescription: false,
|
|
39028
39050
|
},
|
|
39029
39051
|
{
|
|
39030
39052
|
name: "noResolve",
|
|
@@ -39035,7 +39057,7 @@ var ts;
|
|
|
39035
39057
|
// We are not doing a full typecheck, we are not resolving the whole context,
|
|
39036
39058
|
// so pass --noResolve to avoid reporting missing file errors.
|
|
39037
39059
|
transpileOptionValue: true,
|
|
39038
|
-
defaultValueDescription:
|
|
39060
|
+
defaultValueDescription: false,
|
|
39039
39061
|
},
|
|
39040
39062
|
{
|
|
39041
39063
|
name: "stripInternal",
|
|
@@ -39043,7 +39065,7 @@ var ts;
|
|
|
39043
39065
|
affectsEmit: true,
|
|
39044
39066
|
category: ts.Diagnostics.Emit,
|
|
39045
39067
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
39046
|
-
defaultValueDescription:
|
|
39068
|
+
defaultValueDescription: false,
|
|
39047
39069
|
},
|
|
39048
39070
|
{
|
|
39049
39071
|
name: "disableSizeLimit",
|
|
@@ -39051,7 +39073,7 @@ var ts;
|
|
|
39051
39073
|
affectsProgramStructure: true,
|
|
39052
39074
|
category: ts.Diagnostics.Editor_Support,
|
|
39053
39075
|
description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
|
|
39054
|
-
defaultValueDescription:
|
|
39076
|
+
defaultValueDescription: false,
|
|
39055
39077
|
},
|
|
39056
39078
|
{
|
|
39057
39079
|
name: "disableSourceOfProjectReferenceRedirect",
|
|
@@ -39059,7 +39081,7 @@ var ts;
|
|
|
39059
39081
|
isTSConfigOnly: true,
|
|
39060
39082
|
category: ts.Diagnostics.Projects,
|
|
39061
39083
|
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39062
|
-
defaultValueDescription:
|
|
39084
|
+
defaultValueDescription: false,
|
|
39063
39085
|
},
|
|
39064
39086
|
{
|
|
39065
39087
|
name: "disableSolutionSearching",
|
|
@@ -39067,7 +39089,7 @@ var ts;
|
|
|
39067
39089
|
isTSConfigOnly: true,
|
|
39068
39090
|
category: ts.Diagnostics.Projects,
|
|
39069
39091
|
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39070
|
-
defaultValueDescription:
|
|
39092
|
+
defaultValueDescription: false,
|
|
39071
39093
|
},
|
|
39072
39094
|
{
|
|
39073
39095
|
name: "disableReferencedProjectLoad",
|
|
@@ -39075,7 +39097,7 @@ var ts;
|
|
|
39075
39097
|
isTSConfigOnly: true,
|
|
39076
39098
|
category: ts.Diagnostics.Projects,
|
|
39077
39099
|
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39078
|
-
defaultValueDescription:
|
|
39100
|
+
defaultValueDescription: false,
|
|
39079
39101
|
},
|
|
39080
39102
|
{
|
|
39081
39103
|
name: "noImplicitUseStrict",
|
|
@@ -39083,7 +39105,7 @@ var ts;
|
|
|
39083
39105
|
affectsSemanticDiagnostics: true,
|
|
39084
39106
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39085
39107
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
39086
|
-
defaultValueDescription:
|
|
39108
|
+
defaultValueDescription: false,
|
|
39087
39109
|
},
|
|
39088
39110
|
{
|
|
39089
39111
|
name: "noEmitHelpers",
|
|
@@ -39091,7 +39113,7 @@ var ts;
|
|
|
39091
39113
|
affectsEmit: true,
|
|
39092
39114
|
category: ts.Diagnostics.Emit,
|
|
39093
39115
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
39094
|
-
defaultValueDescription:
|
|
39116
|
+
defaultValueDescription: false,
|
|
39095
39117
|
},
|
|
39096
39118
|
{
|
|
39097
39119
|
name: "noEmitOnError",
|
|
@@ -39100,7 +39122,7 @@ var ts;
|
|
|
39100
39122
|
category: ts.Diagnostics.Emit,
|
|
39101
39123
|
transpileOptionValue: undefined,
|
|
39102
39124
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
39103
|
-
defaultValueDescription:
|
|
39125
|
+
defaultValueDescription: false,
|
|
39104
39126
|
},
|
|
39105
39127
|
{
|
|
39106
39128
|
name: "preserveConstEnums",
|
|
@@ -39108,7 +39130,7 @@ var ts;
|
|
|
39108
39130
|
affectsEmit: true,
|
|
39109
39131
|
category: ts.Diagnostics.Emit,
|
|
39110
39132
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39111
|
-
defaultValueDescription:
|
|
39133
|
+
defaultValueDescription: false,
|
|
39112
39134
|
},
|
|
39113
39135
|
{
|
|
39114
39136
|
name: "declarationDir",
|
|
@@ -39125,7 +39147,7 @@ var ts;
|
|
|
39125
39147
|
type: "boolean",
|
|
39126
39148
|
category: ts.Diagnostics.Completeness,
|
|
39127
39149
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
39128
|
-
defaultValueDescription:
|
|
39150
|
+
defaultValueDescription: false,
|
|
39129
39151
|
},
|
|
39130
39152
|
{
|
|
39131
39153
|
name: "allowUnusedLabels",
|
|
@@ -39134,7 +39156,7 @@ var ts;
|
|
|
39134
39156
|
affectsSemanticDiagnostics: true,
|
|
39135
39157
|
category: ts.Diagnostics.Type_Checking,
|
|
39136
39158
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
39137
|
-
defaultValueDescription:
|
|
39159
|
+
defaultValueDescription: undefined,
|
|
39138
39160
|
},
|
|
39139
39161
|
{
|
|
39140
39162
|
name: "allowUnreachableCode",
|
|
@@ -39143,7 +39165,7 @@ var ts;
|
|
|
39143
39165
|
affectsSemanticDiagnostics: true,
|
|
39144
39166
|
category: ts.Diagnostics.Type_Checking,
|
|
39145
39167
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
39146
|
-
defaultValueDescription:
|
|
39168
|
+
defaultValueDescription: undefined,
|
|
39147
39169
|
},
|
|
39148
39170
|
{
|
|
39149
39171
|
name: "suppressExcessPropertyErrors",
|
|
@@ -39151,7 +39173,7 @@ var ts;
|
|
|
39151
39173
|
affectsSemanticDiagnostics: true,
|
|
39152
39174
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39153
39175
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
39154
|
-
defaultValueDescription:
|
|
39176
|
+
defaultValueDescription: false,
|
|
39155
39177
|
},
|
|
39156
39178
|
{
|
|
39157
39179
|
name: "suppressImplicitAnyIndexErrors",
|
|
@@ -39159,7 +39181,7 @@ var ts;
|
|
|
39159
39181
|
affectsSemanticDiagnostics: true,
|
|
39160
39182
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39161
39183
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
39162
|
-
defaultValueDescription:
|
|
39184
|
+
defaultValueDescription: false,
|
|
39163
39185
|
},
|
|
39164
39186
|
{
|
|
39165
39187
|
name: "forceConsistentCasingInFileNames",
|
|
@@ -39167,7 +39189,7 @@ var ts;
|
|
|
39167
39189
|
affectsModuleResolution: true,
|
|
39168
39190
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39169
39191
|
description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
39170
|
-
defaultValueDescription:
|
|
39192
|
+
defaultValueDescription: false,
|
|
39171
39193
|
},
|
|
39172
39194
|
{
|
|
39173
39195
|
name: "maxNodeModuleJsDepth",
|
|
@@ -39175,7 +39197,7 @@ var ts;
|
|
|
39175
39197
|
affectsModuleResolution: true,
|
|
39176
39198
|
category: ts.Diagnostics.JavaScript_Support,
|
|
39177
39199
|
description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
|
|
39178
|
-
defaultValueDescription:
|
|
39200
|
+
defaultValueDescription: 0,
|
|
39179
39201
|
},
|
|
39180
39202
|
{
|
|
39181
39203
|
name: "noStrictGenericChecks",
|
|
@@ -39183,7 +39205,7 @@ var ts;
|
|
|
39183
39205
|
affectsSemanticDiagnostics: true,
|
|
39184
39206
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39185
39207
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
39186
|
-
defaultValueDescription:
|
|
39208
|
+
defaultValueDescription: false,
|
|
39187
39209
|
},
|
|
39188
39210
|
{
|
|
39189
39211
|
name: "useDefineForClassFields",
|
|
@@ -39200,14 +39222,14 @@ var ts;
|
|
|
39200
39222
|
affectsEmit: true,
|
|
39201
39223
|
category: ts.Diagnostics.Emit,
|
|
39202
39224
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39203
|
-
defaultValueDescription:
|
|
39225
|
+
defaultValueDescription: false,
|
|
39204
39226
|
},
|
|
39205
39227
|
{
|
|
39206
39228
|
name: "keyofStringsOnly",
|
|
39207
39229
|
type: "boolean",
|
|
39208
39230
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39209
39231
|
description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
|
|
39210
|
-
defaultValueDescription:
|
|
39232
|
+
defaultValueDescription: false,
|
|
39211
39233
|
},
|
|
39212
39234
|
{
|
|
39213
39235
|
// A list of plugins to load in the language service
|
|
@@ -39249,7 +39271,7 @@ var ts;
|
|
|
39249
39271
|
category: ts.Diagnostics.Command_line_Options,
|
|
39250
39272
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39251
39273
|
type: "boolean",
|
|
39252
|
-
defaultValueDescription:
|
|
39274
|
+
defaultValueDescription: false,
|
|
39253
39275
|
},
|
|
39254
39276
|
{
|
|
39255
39277
|
name: "dry",
|
|
@@ -39257,7 +39279,7 @@ var ts;
|
|
|
39257
39279
|
category: ts.Diagnostics.Command_line_Options,
|
|
39258
39280
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39259
39281
|
type: "boolean",
|
|
39260
|
-
defaultValueDescription:
|
|
39282
|
+
defaultValueDescription: false,
|
|
39261
39283
|
},
|
|
39262
39284
|
{
|
|
39263
39285
|
name: "force",
|
|
@@ -39265,14 +39287,14 @@ var ts;
|
|
|
39265
39287
|
category: ts.Diagnostics.Command_line_Options,
|
|
39266
39288
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39267
39289
|
type: "boolean",
|
|
39268
|
-
defaultValueDescription:
|
|
39290
|
+
defaultValueDescription: false,
|
|
39269
39291
|
},
|
|
39270
39292
|
{
|
|
39271
39293
|
name: "clean",
|
|
39272
39294
|
category: ts.Diagnostics.Command_line_Options,
|
|
39273
39295
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39274
39296
|
type: "boolean",
|
|
39275
|
-
defaultValueDescription:
|
|
39297
|
+
defaultValueDescription: false,
|
|
39276
39298
|
}
|
|
39277
39299
|
];
|
|
39278
39300
|
/* @internal */
|
|
@@ -39285,12 +39307,12 @@ var ts;
|
|
|
39285
39307
|
*/
|
|
39286
39308
|
name: "enableAutoDiscovery",
|
|
39287
39309
|
type: "boolean",
|
|
39288
|
-
defaultValueDescription:
|
|
39310
|
+
defaultValueDescription: false,
|
|
39289
39311
|
},
|
|
39290
39312
|
{
|
|
39291
39313
|
name: "enable",
|
|
39292
39314
|
type: "boolean",
|
|
39293
|
-
defaultValueDescription:
|
|
39315
|
+
defaultValueDescription: false,
|
|
39294
39316
|
},
|
|
39295
39317
|
{
|
|
39296
39318
|
name: "include",
|
|
@@ -39311,7 +39333,7 @@ var ts;
|
|
|
39311
39333
|
{
|
|
39312
39334
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39313
39335
|
type: "boolean",
|
|
39314
|
-
defaultValueDescription:
|
|
39336
|
+
defaultValueDescription: false,
|
|
39315
39337
|
},
|
|
39316
39338
|
];
|
|
39317
39339
|
/*@internal*/
|
|
@@ -41443,7 +41465,10 @@ var ts;
|
|
|
41443
41465
|
}
|
|
41444
41466
|
}
|
|
41445
41467
|
var failedLookupLocations = [];
|
|
41446
|
-
var
|
|
41468
|
+
var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
|
|
41469
|
+
ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
|
|
41470
|
+
NodeResolutionFeatures.None;
|
|
41471
|
+
var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
|
|
41447
41472
|
var resolved = primaryLookup();
|
|
41448
41473
|
var primary = true;
|
|
41449
41474
|
if (!resolved) {
|
|
@@ -42118,13 +42143,15 @@ var ts;
|
|
|
42118
42143
|
// not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
|
|
42119
42144
|
NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
|
|
42120
42145
|
NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
|
|
42146
|
+
NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
|
|
42147
|
+
NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
|
|
42121
42148
|
NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
|
|
42122
42149
|
})(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
|
|
42123
42150
|
function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42124
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42151
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42125
42152
|
}
|
|
42126
42153
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42127
|
-
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.
|
|
42154
|
+
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
42128
42155
|
}
|
|
42129
42156
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
42130
42157
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
@@ -46830,6 +46857,7 @@ var ts;
|
|
|
46830
46857
|
getIndexInfosOfType: getIndexInfosOfType,
|
|
46831
46858
|
getSignaturesOfType: getSignaturesOfType,
|
|
46832
46859
|
getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType); },
|
|
46860
|
+
getIndexType: function (type) { return getIndexType(type); },
|
|
46833
46861
|
getBaseTypes: getBaseTypes,
|
|
46834
46862
|
getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
|
|
46835
46863
|
getWidenedType: getWidenedType,
|
|
@@ -48087,11 +48115,12 @@ var ts;
|
|
|
48087
48115
|
*
|
|
48088
48116
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48089
48117
|
*/
|
|
48090
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48118
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
48091
48119
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48092
|
-
|
|
48120
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
48121
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
48093
48122
|
}
|
|
48094
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48123
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
48095
48124
|
var _a, _b, _c;
|
|
48096
48125
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48097
48126
|
var result;
|
|
@@ -48408,7 +48437,7 @@ var ts;
|
|
|
48408
48437
|
}
|
|
48409
48438
|
}
|
|
48410
48439
|
if (!result) {
|
|
48411
|
-
if (nameNotFoundMessage) {
|
|
48440
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48412
48441
|
if (!errorLocation ||
|
|
48413
48442
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
|
|
48414
48443
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -48418,7 +48447,7 @@ var ts;
|
|
|
48418
48447
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48419
48448
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48420
48449
|
var suggestion = void 0;
|
|
48421
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
48450
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
48422
48451
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48423
48452
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48424
48453
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48454,7 +48483,7 @@ var ts;
|
|
|
48454
48483
|
return undefined;
|
|
48455
48484
|
}
|
|
48456
48485
|
// Perform extra checks only if error reporting was requested
|
|
48457
|
-
if (nameNotFoundMessage) {
|
|
48486
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48458
48487
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
|
|
48459
48488
|
// We have a match, but the reference occurred within a property initializer and the identifier also binds
|
|
48460
48489
|
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
|
|
@@ -50930,7 +50959,7 @@ var ts;
|
|
|
50930
50959
|
context.approximateLength += 6;
|
|
50931
50960
|
return ts.factory.createKeywordTypeNode(147 /* ObjectKeyword */);
|
|
50932
50961
|
}
|
|
50933
|
-
if (isThisTypeParameter(type)) {
|
|
50962
|
+
if (ts.isThisTypeParameter(type)) {
|
|
50934
50963
|
if (context.flags & 4194304 /* InObjectTypeLiteral */) {
|
|
50935
50964
|
if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
|
|
50936
50965
|
context.encounteredError = true;
|
|
@@ -58875,7 +58904,7 @@ var ts;
|
|
|
58875
58904
|
}
|
|
58876
58905
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
58877
58906
|
// Don't track references for global symbols anyway, so value if `isReference` is arbitrary
|
|
58878
|
-
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
|
|
58907
|
+
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
|
|
58879
58908
|
}
|
|
58880
58909
|
function getGlobalType(name, arity, reportErrors) {
|
|
58881
58910
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -60454,9 +60483,6 @@ var ts;
|
|
|
60454
60483
|
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
|
|
60455
60484
|
(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
|
|
60456
60485
|
}
|
|
60457
|
-
function isThisTypeParameter(type) {
|
|
60458
|
-
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
60459
|
-
}
|
|
60460
60486
|
function getSimplifiedType(type, writing) {
|
|
60461
60487
|
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
|
|
60462
60488
|
type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) :
|
|
@@ -65654,7 +65680,7 @@ var ts;
|
|
|
65654
65680
|
// flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns
|
|
65655
65681
|
// no flags for all other types (including non-falsy literal types).
|
|
65656
65682
|
function getFalsyFlags(type) {
|
|
65657
|
-
return type.flags &
|
|
65683
|
+
return type.flags & 3145728 /* UnionOrIntersection */ ? getFalsyFlagsOfTypes(type.types) :
|
|
65658
65684
|
type.flags & 128 /* StringLiteral */ ? type.value === "" ? 128 /* StringLiteral */ : 0 :
|
|
65659
65685
|
type.flags & 256 /* NumberLiteral */ ? type.value === 0 ? 256 /* NumberLiteral */ : 0 :
|
|
65660
65686
|
type.flags & 2048 /* BigIntLiteral */ ? isZeroBigInt(type) ? 2048 /* BigIntLiteral */ : 0 :
|
|
@@ -67270,6 +67296,11 @@ var ts;
|
|
|
67270
67296
|
case "BigInt64Array":
|
|
67271
67297
|
case "BigUint64Array":
|
|
67272
67298
|
return ts.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;
|
|
67299
|
+
case "await":
|
|
67300
|
+
if (ts.isCallExpression(node.parent)) {
|
|
67301
|
+
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
67302
|
+
}
|
|
67303
|
+
// falls through
|
|
67273
67304
|
default:
|
|
67274
67305
|
if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
|
|
67275
67306
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
@@ -68827,7 +68858,7 @@ var ts;
|
|
|
68827
68858
|
function narrowByInKeyword(type, name, assumeTrue) {
|
|
68828
68859
|
if (type.flags & 1048576 /* Union */
|
|
68829
68860
|
|| type.flags & 524288 /* Object */ && declaredType !== type
|
|
68830
|
-
|| isThisTypeParameter(type)
|
|
68861
|
+
|| ts.isThisTypeParameter(type)
|
|
68831
68862
|
|| type.flags & 2097152 /* Intersection */ && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
|
|
68832
68863
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
68833
68864
|
}
|
|
@@ -71647,15 +71678,9 @@ var ts;
|
|
|
71647
71678
|
}
|
|
71648
71679
|
}
|
|
71649
71680
|
function isValidSpreadType(type) {
|
|
71650
|
-
|
|
71651
|
-
|
|
71652
|
-
|
|
71653
|
-
return isValidSpreadType(constraint);
|
|
71654
|
-
}
|
|
71655
|
-
}
|
|
71656
|
-
return !!(type.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71657
|
-
getFalsyFlags(type) & 117632 /* DefinitelyFalsy */ && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
|
|
71658
|
-
type.flags & 3145728 /* UnionOrIntersection */ && ts.every(type.types, isValidSpreadType));
|
|
71681
|
+
var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
|
|
71682
|
+
return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71683
|
+
t.flags & 3145728 /* UnionOrIntersection */ && ts.every(t.types, isValidSpreadType));
|
|
71659
71684
|
}
|
|
71660
71685
|
function checkJsxSelfClosingElementDeferred(node) {
|
|
71661
71686
|
checkJsxOpeningLikeElementOrOpeningFragment(node);
|
|
@@ -72606,7 +72631,7 @@ var ts;
|
|
|
72606
72631
|
}
|
|
72607
72632
|
var propType;
|
|
72608
72633
|
if (!prop) {
|
|
72609
|
-
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
|
|
72634
|
+
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
|
|
72610
72635
|
getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
|
|
72611
72636
|
if (!(indexInfo && indexInfo.type)) {
|
|
72612
72637
|
var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, /*excludeClasses*/ true);
|
|
@@ -72623,7 +72648,7 @@ var ts;
|
|
|
72623
72648
|
return anyType;
|
|
72624
72649
|
}
|
|
72625
72650
|
if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
|
|
72626
|
-
reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72651
|
+
reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72627
72652
|
}
|
|
72628
72653
|
return errorType;
|
|
72629
72654
|
}
|
|
@@ -72916,7 +72941,7 @@ var ts;
|
|
|
72916
72941
|
}
|
|
72917
72942
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
72918
72943
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
72919
|
-
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
|
|
72944
|
+
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
|
|
72920
72945
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
72921
72946
|
var symbol = getSymbol(symbols, name, meaning);
|
|
72922
72947
|
// Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
|
|
@@ -73162,7 +73187,7 @@ var ts;
|
|
|
73162
73187
|
}
|
|
73163
73188
|
var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
|
|
73164
73189
|
var accessFlags = ts.isAssignmentTarget(node) ?
|
|
73165
|
-
4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73190
|
+
4 /* Writing */ | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73166
73191
|
32 /* ExpressionPosition */;
|
|
73167
73192
|
var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
|
|
73168
73193
|
return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
|
|
@@ -86624,18 +86649,22 @@ var ts;
|
|
|
86624
86649
|
return false;
|
|
86625
86650
|
}
|
|
86626
86651
|
function checkNumericLiteralValueSize(node) {
|
|
86652
|
+
// We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
|
|
86653
|
+
// e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
|
|
86654
|
+
var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
|
|
86655
|
+
var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
86627
86656
|
// Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
|
|
86628
|
-
// Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
|
|
86629
86657
|
// Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
|
|
86630
|
-
if (
|
|
86658
|
+
if (isFractional || isScientific) {
|
|
86631
86659
|
return;
|
|
86632
86660
|
}
|
|
86633
|
-
//
|
|
86634
|
-
//
|
|
86635
|
-
//
|
|
86636
|
-
//
|
|
86637
|
-
|
|
86638
|
-
|
|
86661
|
+
// Here `node` is guaranteed to be a numeric literal representing an integer.
|
|
86662
|
+
// We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
|
|
86663
|
+
// 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
|
|
86664
|
+
// 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
|
|
86665
|
+
// thus the result of the predicate won't be affected.
|
|
86666
|
+
var value = +node.text;
|
|
86667
|
+
if (value <= Math.pow(2, 53) - 1) {
|
|
86639
86668
|
return;
|
|
86640
86669
|
}
|
|
86641
86670
|
addErrorOrSuggestion(/*isError*/ false, ts.createDiagnosticForNode(node, ts.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers));
|
|
@@ -90097,7 +90126,7 @@ var ts;
|
|
|
90097
90126
|
// ], C.prototype, "prop");
|
|
90098
90127
|
//
|
|
90099
90128
|
var prefix = getClassMemberPrefix(node, member);
|
|
90100
|
-
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/
|
|
90129
|
+
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
|
|
90101
90130
|
var descriptor = languageVersion > 0 /* ES3 */
|
|
90102
90131
|
? member.kind === 166 /* PropertyDeclaration */
|
|
90103
90132
|
// We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it
|
|
@@ -127601,7 +127630,7 @@ var ts;
|
|
|
127601
127630
|
case 0 /* Paths */:
|
|
127602
127631
|
return convertPathCompletions(completion.paths);
|
|
127603
127632
|
case 1 /* Properties */: {
|
|
127604
|
-
var entries =
|
|
127633
|
+
var entries = ts.createSortedArray();
|
|
127605
127634
|
Completions.getCompletionEntriesFromSymbols(completion.symbols, entries, contextToken, contextToken, sourceFile, sourceFile, host, program, 99 /* ESNext */, log, 4 /* String */, preferences, options); // Target will not be used, so arbitrary
|
|
127606
127635
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan: optionalReplacementSpan, entries: entries };
|
|
127607
127636
|
}
|
|
@@ -127799,7 +127828,7 @@ var ts;
|
|
|
127799
127828
|
var types = ts.flatMap(candidates, function (candidate) {
|
|
127800
127829
|
if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
127801
127830
|
return;
|
|
127802
|
-
var type =
|
|
127831
|
+
var type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex);
|
|
127803
127832
|
isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
|
|
127804
127833
|
return getStringLiteralTypes(type, uniques);
|
|
127805
127834
|
});
|
|
@@ -128483,6 +128512,29 @@ var ts;
|
|
|
128483
128512
|
}
|
|
128484
128513
|
}
|
|
128485
128514
|
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
|
|
128515
|
+
// Editors will use the `sortText` and then fall back to `name` for sorting, but leave ties in response order.
|
|
128516
|
+
// So, it's important that we sort those ties in the order we want them displayed if it matters. We don't
|
|
128517
|
+
// strictly need to sort by name or SortText here since clients are going to do it anyway, but we have to
|
|
128518
|
+
// do the work of comparing them so we can sort those ties appropriately; plus, it makes the order returned
|
|
128519
|
+
// by the language service consistent with what TS Server does and what editors typically do. This also makes
|
|
128520
|
+
// completions tests make more sense. We used to sort only alphabetically and only in the server layer, but
|
|
128521
|
+
// this made tests really weird, since most fourslash tests don't use the server.
|
|
128522
|
+
function compareCompletionEntries(entryInArray, entryToInsert) {
|
|
128523
|
+
var _a, _b;
|
|
128524
|
+
var result = ts.compareStringsCaseSensitiveUI(entryInArray.sortText, entryToInsert.sortText);
|
|
128525
|
+
if (result === 0 /* EqualTo */) {
|
|
128526
|
+
result = ts.compareStringsCaseSensitiveUI(entryInArray.name, entryToInsert.name);
|
|
128527
|
+
}
|
|
128528
|
+
if (result === 0 /* EqualTo */ && ((_a = entryInArray.data) === null || _a === void 0 ? void 0 : _a.moduleSpecifier) && ((_b = entryToInsert.data) === null || _b === void 0 ? void 0 : _b.moduleSpecifier)) {
|
|
128529
|
+
// Sort same-named auto-imports by module specifier
|
|
128530
|
+
result = ts.compareNumberOfDirectorySeparators(entryInArray.data.moduleSpecifier, entryToInsert.data.moduleSpecifier);
|
|
128531
|
+
}
|
|
128532
|
+
if (result === 0 /* EqualTo */) {
|
|
128533
|
+
// Fall back to symbol order - if we return `EqualTo`, `insertSorted` will put later symbols first.
|
|
128534
|
+
return -1 /* LessThan */;
|
|
128535
|
+
}
|
|
128536
|
+
return result;
|
|
128537
|
+
}
|
|
128486
128538
|
function completionEntryDataIsResolved(data) {
|
|
128487
128539
|
return !!(data === null || data === void 0 ? void 0 : data.moduleSpecifier);
|
|
128488
128540
|
}
|
|
@@ -128569,7 +128621,7 @@ var ts;
|
|
|
128569
128621
|
return completionInfo;
|
|
128570
128622
|
}
|
|
128571
128623
|
}
|
|
128572
|
-
var entries =
|
|
128624
|
+
var entries = ts.createSortedArray();
|
|
128573
128625
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
128574
128626
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
128575
128627
|
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
@@ -128587,13 +128639,13 @@ var ts;
|
|
|
128587
128639
|
for (var _i = 0, _a = getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && ts.isSourceFileJS(sourceFile)); _i < _a.length; _i++) {
|
|
128588
128640
|
var keywordEntry = _a[_i];
|
|
128589
128641
|
if (!entryNames.has(keywordEntry.name)) {
|
|
128590
|
-
|
|
128642
|
+
ts.insertSorted(entries, keywordEntry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
128591
128643
|
}
|
|
128592
128644
|
}
|
|
128593
128645
|
}
|
|
128594
128646
|
for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) {
|
|
128595
128647
|
var literal = literals_1[_b];
|
|
128596
|
-
|
|
128648
|
+
ts.insertSorted(entries, createCompletionEntryForLiteral(sourceFile, preferences, literal), compareCompletionEntries, /*allowDuplicates*/ true);
|
|
128597
128649
|
}
|
|
128598
128650
|
return {
|
|
128599
128651
|
isGlobalCompletion: isInSnippetScope,
|
|
@@ -128669,13 +128721,13 @@ var ts;
|
|
|
128669
128721
|
var realName = ts.unescapeLeadingUnderscores(name);
|
|
128670
128722
|
if (!uniqueNames.has(realName) && ts.isIdentifierText(realName, target)) {
|
|
128671
128723
|
uniqueNames.add(realName);
|
|
128672
|
-
|
|
128724
|
+
ts.insertSorted(entries, {
|
|
128673
128725
|
name: realName,
|
|
128674
128726
|
kind: "warning" /* warning */,
|
|
128675
128727
|
kindModifiers: "",
|
|
128676
128728
|
sortText: SortText.JavascriptIdentifiers,
|
|
128677
128729
|
isFromUncheckedFile: true
|
|
128678
|
-
});
|
|
128730
|
+
}, compareCompletionEntries);
|
|
128679
128731
|
}
|
|
128680
128732
|
});
|
|
128681
128733
|
}
|
|
@@ -129099,7 +129151,7 @@ var ts;
|
|
|
129099
129151
|
/** True for locals; false for globals, module exports from other files, `this.` completions. */
|
|
129100
129152
|
var shouldShadowLaterSymbols = !origin && !(symbol.parent === undefined && !ts.some(symbol.declarations, function (d) { return d.getSourceFile() === location.getSourceFile(); }));
|
|
129101
129153
|
uniques.set(name, shouldShadowLaterSymbols);
|
|
129102
|
-
|
|
129154
|
+
ts.insertSorted(entries, entry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
129103
129155
|
}
|
|
129104
129156
|
log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
|
|
129105
129157
|
// Prevent consumers of this map from having to worry about
|
|
@@ -151576,6 +151628,7 @@ var ts;
|
|
|
151576
151628
|
var errorCodes = [
|
|
151577
151629
|
ts.Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
151578
151630
|
ts.Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
151631
|
+
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code
|
|
151579
151632
|
];
|
|
151580
151633
|
codefix.registerCodeFix({
|
|
151581
151634
|
errorCodes: errorCodes,
|
|
@@ -159386,6 +159439,9 @@ var ts;
|
|
|
159386
159439
|
TypeObject.prototype.isClass = function () {
|
|
159387
159440
|
return !!(ts.getObjectFlags(this) & 1 /* Class */);
|
|
159388
159441
|
};
|
|
159442
|
+
TypeObject.prototype.isIndexType = function () {
|
|
159443
|
+
return !!(this.flags & 4194304 /* Index */);
|
|
159444
|
+
};
|
|
159389
159445
|
Object.defineProperty(TypeObject.prototype, "typeArguments", {
|
|
159390
159446
|
/**
|
|
159391
159447
|
* This polyfills `referenceType.typeArguments` for API consumers
|
|
@@ -159418,6 +159474,16 @@ var ts;
|
|
|
159418
159474
|
SignatureObject.prototype.getReturnType = function () {
|
|
159419
159475
|
return this.checker.getReturnTypeOfSignature(this);
|
|
159420
159476
|
};
|
|
159477
|
+
SignatureObject.prototype.getTypeParameterAtPosition = function (pos) {
|
|
159478
|
+
var type = this.checker.getParameterType(this, pos);
|
|
159479
|
+
if (type.isIndexType() && ts.isThisTypeParameter(type.type)) {
|
|
159480
|
+
var constraint = type.type.getConstraint();
|
|
159481
|
+
if (constraint) {
|
|
159482
|
+
return this.checker.getIndexType(constraint);
|
|
159483
|
+
}
|
|
159484
|
+
}
|
|
159485
|
+
return type;
|
|
159486
|
+
};
|
|
159421
159487
|
SignatureObject.prototype.getDocumentationComment = function () {
|
|
159422
159488
|
return this.documentationComment || (this.documentationComment = getDocumentationComment(ts.singleElementArray(this.declaration), this.checker));
|
|
159423
159489
|
};
|
|
@@ -171763,14 +171829,14 @@ var ts;
|
|
|
171763
171829
|
if (kind === "completions-full" /* CompletionsFull */)
|
|
171764
171830
|
return completions;
|
|
171765
171831
|
var prefix = args.prefix || "";
|
|
171766
|
-
var entries = ts.
|
|
171832
|
+
var entries = ts.mapDefined(completions.entries, function (entry) {
|
|
171767
171833
|
if (completions.isMemberCompletion || ts.startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) {
|
|
171768
171834
|
var name = entry.name, kind_1 = entry.kind, kindModifiers = entry.kindModifiers, sortText = entry.sortText, insertText = entry.insertText, replacementSpan = entry.replacementSpan, hasAction = entry.hasAction, source = entry.source, sourceDisplay = entry.sourceDisplay, isSnippet = entry.isSnippet, isRecommended = entry.isRecommended, isPackageJsonImport = entry.isPackageJsonImport, isImportStatementCompletion = entry.isImportStatementCompletion, data = entry.data;
|
|
171769
171835
|
var convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : undefined;
|
|
171770
171836
|
// Use `hasAction || undefined` to avoid serializing `false`.
|
|
171771
171837
|
return { name: name, kind: kind_1, kindModifiers: kindModifiers, sortText: sortText, insertText: insertText, replacementSpan: convertedSpan, isSnippet: isSnippet, hasAction: hasAction || undefined, source: source, sourceDisplay: sourceDisplay, isRecommended: isRecommended, isPackageJsonImport: isPackageJsonImport, isImportStatementCompletion: isImportStatementCompletion, data: data };
|
|
171772
171838
|
}
|
|
171773
|
-
})
|
|
171839
|
+
});
|
|
171774
171840
|
if (kind === "completions" /* Completions */) {
|
|
171775
171841
|
if (completions.metadata)
|
|
171776
171842
|
entries.metadata = completions.metadata;
|