typescript 4.6.0-dev.20211130 → 4.6.0-dev.20211204
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 +165 -120
- package/lib/tsserver.js +194 -132
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +194 -132
- package/lib/typescript.d.ts +2 -0
- package/lib/typescript.js +192 -130
- package/lib/typescriptServices.d.ts +2 -0
- package/lib/typescriptServices.js +192 -130
- package/lib/typingsInstaller.js +147 -122
- 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.20211204";
|
|
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;
|
|
@@ -33608,9 +33620,10 @@ var ts;
|
|
|
33608
33620
|
// - "(x,y)" is a comma expression parsed as a signature with two parameters.
|
|
33609
33621
|
// - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
|
|
33610
33622
|
// - "a ? (b): function() {}" will too, since function() is a valid JSDoc function type.
|
|
33623
|
+
// - "a ? (b): (function() {})" as well, but inside of a parenthesized type.
|
|
33611
33624
|
//
|
|
33612
33625
|
// So we need just a bit of lookahead to ensure that it can only be a signature.
|
|
33613
|
-
var hasJSDocFunctionType = type && ts.isJSDocFunctionType(type);
|
|
33626
|
+
var hasJSDocFunctionType = type && (ts.isJSDocFunctionType(type) || ts.isParenthesizedTypeNode(type) && ts.isJSDocFunctionType(type.type));
|
|
33614
33627
|
if (!allowAmbiguity && token() !== 38 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 18 /* OpenBraceToken */)) {
|
|
33615
33628
|
// Returning undefined here will cause our caller to rewind to where we started from.
|
|
33616
33629
|
return undefined;
|
|
@@ -38009,7 +38022,11 @@ var ts;
|
|
|
38009
38022
|
var ts;
|
|
38010
38023
|
(function (ts) {
|
|
38011
38024
|
/* @internal */
|
|
38012
|
-
ts.compileOnSaveCommandLineOption = {
|
|
38025
|
+
ts.compileOnSaveCommandLineOption = {
|
|
38026
|
+
name: "compileOnSave",
|
|
38027
|
+
type: "boolean",
|
|
38028
|
+
defaultValueDescription: false,
|
|
38029
|
+
};
|
|
38013
38030
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
38014
38031
|
"preserve": 1 /* Preserve */,
|
|
38015
38032
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38123,6 +38140,7 @@ var ts;
|
|
|
38123
38140
|
})),
|
|
38124
38141
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38125
38142
|
description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
38143
|
+
defaultValueDescription: ts.WatchFileKind.UseFsEvents,
|
|
38126
38144
|
},
|
|
38127
38145
|
{
|
|
38128
38146
|
name: "watchDirectory",
|
|
@@ -38134,6 +38152,7 @@ var ts;
|
|
|
38134
38152
|
})),
|
|
38135
38153
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38136
38154
|
description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
38155
|
+
defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
|
|
38137
38156
|
},
|
|
38138
38157
|
{
|
|
38139
38158
|
name: "fallbackPolling",
|
|
@@ -38145,13 +38164,14 @@ var ts;
|
|
|
38145
38164
|
})),
|
|
38146
38165
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38147
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,
|
|
38148
38168
|
},
|
|
38149
38169
|
{
|
|
38150
38170
|
name: "synchronousWatchDirectory",
|
|
38151
38171
|
type: "boolean",
|
|
38152
38172
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38153
38173
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38154
|
-
defaultValueDescription:
|
|
38174
|
+
defaultValueDescription: false,
|
|
38155
38175
|
},
|
|
38156
38176
|
{
|
|
38157
38177
|
name: "excludeDirectories",
|
|
@@ -38187,13 +38207,13 @@ var ts;
|
|
|
38187
38207
|
showInSimplifiedHelpView: true,
|
|
38188
38208
|
category: ts.Diagnostics.Command_line_Options,
|
|
38189
38209
|
description: ts.Diagnostics.Print_this_message,
|
|
38190
|
-
defaultValueDescription:
|
|
38210
|
+
defaultValueDescription: false,
|
|
38191
38211
|
},
|
|
38192
38212
|
{
|
|
38193
38213
|
name: "help",
|
|
38194
38214
|
shortName: "?",
|
|
38195
38215
|
type: "boolean",
|
|
38196
|
-
defaultValueDescription:
|
|
38216
|
+
defaultValueDescription: false,
|
|
38197
38217
|
},
|
|
38198
38218
|
{
|
|
38199
38219
|
name: "watch",
|
|
@@ -38203,7 +38223,7 @@ var ts;
|
|
|
38203
38223
|
isCommandLineOnly: true,
|
|
38204
38224
|
category: ts.Diagnostics.Command_line_Options,
|
|
38205
38225
|
description: ts.Diagnostics.Watch_input_files,
|
|
38206
|
-
defaultValueDescription:
|
|
38226
|
+
defaultValueDescription: false,
|
|
38207
38227
|
},
|
|
38208
38228
|
{
|
|
38209
38229
|
name: "preserveWatchOutput",
|
|
@@ -38211,28 +38231,28 @@ var ts;
|
|
|
38211
38231
|
showInSimplifiedHelpView: false,
|
|
38212
38232
|
category: ts.Diagnostics.Output_Formatting,
|
|
38213
38233
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38214
|
-
defaultValueDescription:
|
|
38234
|
+
defaultValueDescription: false,
|
|
38215
38235
|
},
|
|
38216
38236
|
{
|
|
38217
38237
|
name: "listFiles",
|
|
38218
38238
|
type: "boolean",
|
|
38219
38239
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38220
38240
|
description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
|
|
38221
|
-
defaultValueDescription:
|
|
38241
|
+
defaultValueDescription: false,
|
|
38222
38242
|
},
|
|
38223
38243
|
{
|
|
38224
38244
|
name: "explainFiles",
|
|
38225
38245
|
type: "boolean",
|
|
38226
38246
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38227
38247
|
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38228
|
-
defaultValueDescription:
|
|
38248
|
+
defaultValueDescription: false,
|
|
38229
38249
|
},
|
|
38230
38250
|
{
|
|
38231
38251
|
name: "listEmittedFiles",
|
|
38232
38252
|
type: "boolean",
|
|
38233
38253
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38234
38254
|
description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
|
|
38235
|
-
defaultValueDescription:
|
|
38255
|
+
defaultValueDescription: false,
|
|
38236
38256
|
},
|
|
38237
38257
|
{
|
|
38238
38258
|
name: "pretty",
|
|
@@ -38240,28 +38260,28 @@ var ts;
|
|
|
38240
38260
|
showInSimplifiedHelpView: true,
|
|
38241
38261
|
category: ts.Diagnostics.Output_Formatting,
|
|
38242
38262
|
description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
|
|
38243
|
-
defaultValueDescription:
|
|
38263
|
+
defaultValueDescription: true,
|
|
38244
38264
|
},
|
|
38245
38265
|
{
|
|
38246
38266
|
name: "traceResolution",
|
|
38247
38267
|
type: "boolean",
|
|
38248
38268
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38249
38269
|
description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
|
|
38250
|
-
defaultValueDescription:
|
|
38270
|
+
defaultValueDescription: false,
|
|
38251
38271
|
},
|
|
38252
38272
|
{
|
|
38253
38273
|
name: "diagnostics",
|
|
38254
38274
|
type: "boolean",
|
|
38255
38275
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38256
38276
|
description: ts.Diagnostics.Output_compiler_performance_information_after_building,
|
|
38257
|
-
defaultValueDescription:
|
|
38277
|
+
defaultValueDescription: false,
|
|
38258
38278
|
},
|
|
38259
38279
|
{
|
|
38260
38280
|
name: "extendedDiagnostics",
|
|
38261
38281
|
type: "boolean",
|
|
38262
38282
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38263
38283
|
description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
|
|
38264
|
-
defaultValueDescription:
|
|
38284
|
+
defaultValueDescription: false,
|
|
38265
38285
|
},
|
|
38266
38286
|
{
|
|
38267
38287
|
name: "generateCpuProfile",
|
|
@@ -38297,7 +38317,7 @@ var ts;
|
|
|
38297
38317
|
affectsEmit: true,
|
|
38298
38318
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38299
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,
|
|
38300
|
-
defaultValueDescription:
|
|
38320
|
+
defaultValueDescription: false,
|
|
38301
38321
|
},
|
|
38302
38322
|
{
|
|
38303
38323
|
name: "locale",
|
|
@@ -38333,7 +38353,7 @@ var ts;
|
|
|
38333
38353
|
showInSimplifiedHelpView: true,
|
|
38334
38354
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38335
38355
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38336
|
-
defaultValueDescription:
|
|
38356
|
+
defaultValueDescription: 0 /* ES3 */,
|
|
38337
38357
|
};
|
|
38338
38358
|
var commandOptionsWithoutBuild = [
|
|
38339
38359
|
// CommandLine only options
|
|
@@ -38343,7 +38363,7 @@ var ts;
|
|
|
38343
38363
|
showInSimplifiedHelpView: true,
|
|
38344
38364
|
category: ts.Diagnostics.Command_line_Options,
|
|
38345
38365
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38346
|
-
defaultValueDescription:
|
|
38366
|
+
defaultValueDescription: false,
|
|
38347
38367
|
},
|
|
38348
38368
|
{
|
|
38349
38369
|
name: "version",
|
|
@@ -38352,7 +38372,7 @@ var ts;
|
|
|
38352
38372
|
showInSimplifiedHelpView: true,
|
|
38353
38373
|
category: ts.Diagnostics.Command_line_Options,
|
|
38354
38374
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38355
|
-
defaultValueDescription:
|
|
38375
|
+
defaultValueDescription: false,
|
|
38356
38376
|
},
|
|
38357
38377
|
{
|
|
38358
38378
|
name: "init",
|
|
@@ -38360,7 +38380,7 @@ var ts;
|
|
|
38360
38380
|
showInSimplifiedHelpView: true,
|
|
38361
38381
|
category: ts.Diagnostics.Command_line_Options,
|
|
38362
38382
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38363
|
-
defaultValueDescription:
|
|
38383
|
+
defaultValueDescription: false,
|
|
38364
38384
|
},
|
|
38365
38385
|
{
|
|
38366
38386
|
name: "project",
|
|
@@ -38379,7 +38399,7 @@ var ts;
|
|
|
38379
38399
|
showInSimplifiedHelpView: true,
|
|
38380
38400
|
category: ts.Diagnostics.Command_line_Options,
|
|
38381
38401
|
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38382
|
-
defaultValueDescription:
|
|
38402
|
+
defaultValueDescription: false,
|
|
38383
38403
|
},
|
|
38384
38404
|
{
|
|
38385
38405
|
name: "showConfig",
|
|
@@ -38388,7 +38408,7 @@ var ts;
|
|
|
38388
38408
|
category: ts.Diagnostics.Command_line_Options,
|
|
38389
38409
|
isCommandLineOnly: true,
|
|
38390
38410
|
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38391
|
-
defaultValueDescription:
|
|
38411
|
+
defaultValueDescription: false,
|
|
38392
38412
|
},
|
|
38393
38413
|
{
|
|
38394
38414
|
name: "listFilesOnly",
|
|
@@ -38398,7 +38418,7 @@ var ts;
|
|
|
38398
38418
|
affectsEmit: true,
|
|
38399
38419
|
isCommandLineOnly: true,
|
|
38400
38420
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38401
|
-
defaultValueDescription:
|
|
38421
|
+
defaultValueDescription: false,
|
|
38402
38422
|
},
|
|
38403
38423
|
// Basic
|
|
38404
38424
|
ts.targetOptionDeclaration,
|
|
@@ -38425,13 +38445,15 @@ var ts;
|
|
|
38425
38445
|
showInSimplifiedHelpView: true,
|
|
38426
38446
|
category: ts.Diagnostics.Modules,
|
|
38427
38447
|
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
38448
|
+
defaultValueDescription: undefined,
|
|
38428
38449
|
},
|
|
38429
38450
|
{
|
|
38430
38451
|
name: "lib",
|
|
38431
38452
|
type: "list",
|
|
38432
38453
|
element: {
|
|
38433
38454
|
name: "lib",
|
|
38434
|
-
type: ts.libMap
|
|
38455
|
+
type: ts.libMap,
|
|
38456
|
+
defaultValueDescription: undefined,
|
|
38435
38457
|
},
|
|
38436
38458
|
affectsProgramStructure: true,
|
|
38437
38459
|
showInSimplifiedHelpView: true,
|
|
@@ -38446,7 +38468,7 @@ var ts;
|
|
|
38446
38468
|
showInSimplifiedHelpView: true,
|
|
38447
38469
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38448
38470
|
description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
38449
|
-
defaultValueDescription:
|
|
38471
|
+
defaultValueDescription: false,
|
|
38450
38472
|
},
|
|
38451
38473
|
{
|
|
38452
38474
|
name: "checkJs",
|
|
@@ -38454,7 +38476,7 @@ var ts;
|
|
|
38454
38476
|
showInSimplifiedHelpView: true,
|
|
38455
38477
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38456
38478
|
description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
38457
|
-
defaultValueDescription:
|
|
38479
|
+
defaultValueDescription: false,
|
|
38458
38480
|
},
|
|
38459
38481
|
{
|
|
38460
38482
|
name: "jsx",
|
|
@@ -38466,7 +38488,7 @@ var ts;
|
|
|
38466
38488
|
showInSimplifiedHelpView: true,
|
|
38467
38489
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38468
38490
|
description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
|
|
38469
|
-
defaultValueDescription:
|
|
38491
|
+
defaultValueDescription: undefined,
|
|
38470
38492
|
},
|
|
38471
38493
|
{
|
|
38472
38494
|
name: "declaration",
|
|
@@ -38486,7 +38508,7 @@ var ts;
|
|
|
38486
38508
|
showInSimplifiedHelpView: true,
|
|
38487
38509
|
category: ts.Diagnostics.Emit,
|
|
38488
38510
|
transpileOptionValue: undefined,
|
|
38489
|
-
defaultValueDescription:
|
|
38511
|
+
defaultValueDescription: false,
|
|
38490
38512
|
description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
38491
38513
|
},
|
|
38492
38514
|
{
|
|
@@ -38497,7 +38519,7 @@ var ts;
|
|
|
38497
38519
|
category: ts.Diagnostics.Emit,
|
|
38498
38520
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
38499
38521
|
transpileOptionValue: undefined,
|
|
38500
|
-
defaultValueDescription:
|
|
38522
|
+
defaultValueDescription: false,
|
|
38501
38523
|
},
|
|
38502
38524
|
{
|
|
38503
38525
|
name: "sourceMap",
|
|
@@ -38505,7 +38527,7 @@ var ts;
|
|
|
38505
38527
|
affectsEmit: true,
|
|
38506
38528
|
showInSimplifiedHelpView: true,
|
|
38507
38529
|
category: ts.Diagnostics.Emit,
|
|
38508
|
-
defaultValueDescription:
|
|
38530
|
+
defaultValueDescription: false,
|
|
38509
38531
|
description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
|
|
38510
38532
|
},
|
|
38511
38533
|
{
|
|
@@ -38546,7 +38568,7 @@ var ts;
|
|
|
38546
38568
|
isTSConfigOnly: true,
|
|
38547
38569
|
category: ts.Diagnostics.Projects,
|
|
38548
38570
|
transpileOptionValue: undefined,
|
|
38549
|
-
defaultValueDescription:
|
|
38571
|
+
defaultValueDescription: false,
|
|
38550
38572
|
description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
|
|
38551
38573
|
},
|
|
38552
38574
|
{
|
|
@@ -38566,7 +38588,7 @@ var ts;
|
|
|
38566
38588
|
affectsEmit: true,
|
|
38567
38589
|
showInSimplifiedHelpView: true,
|
|
38568
38590
|
category: ts.Diagnostics.Emit,
|
|
38569
|
-
defaultValueDescription:
|
|
38591
|
+
defaultValueDescription: false,
|
|
38570
38592
|
description: ts.Diagnostics.Disable_emitting_comments,
|
|
38571
38593
|
},
|
|
38572
38594
|
{
|
|
@@ -38576,7 +38598,7 @@ var ts;
|
|
|
38576
38598
|
category: ts.Diagnostics.Emit,
|
|
38577
38599
|
description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
|
|
38578
38600
|
transpileOptionValue: undefined,
|
|
38579
|
-
defaultValueDescription:
|
|
38601
|
+
defaultValueDescription: false,
|
|
38580
38602
|
},
|
|
38581
38603
|
{
|
|
38582
38604
|
name: "importHelpers",
|
|
@@ -38584,7 +38606,7 @@ var ts;
|
|
|
38584
38606
|
affectsEmit: true,
|
|
38585
38607
|
category: ts.Diagnostics.Emit,
|
|
38586
38608
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
38587
|
-
defaultValueDescription:
|
|
38609
|
+
defaultValueDescription: false,
|
|
38588
38610
|
},
|
|
38589
38611
|
{
|
|
38590
38612
|
name: "importsNotUsedAsValues",
|
|
@@ -38596,7 +38618,8 @@ var ts;
|
|
|
38596
38618
|
affectsEmit: true,
|
|
38597
38619
|
affectsSemanticDiagnostics: true,
|
|
38598
38620
|
category: ts.Diagnostics.Emit,
|
|
38599
|
-
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 */,
|
|
38600
38623
|
},
|
|
38601
38624
|
{
|
|
38602
38625
|
name: "downlevelIteration",
|
|
@@ -38604,7 +38627,7 @@ var ts;
|
|
|
38604
38627
|
affectsEmit: true,
|
|
38605
38628
|
category: ts.Diagnostics.Emit,
|
|
38606
38629
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
38607
|
-
defaultValueDescription:
|
|
38630
|
+
defaultValueDescription: false,
|
|
38608
38631
|
},
|
|
38609
38632
|
{
|
|
38610
38633
|
name: "isolatedModules",
|
|
@@ -38612,7 +38635,7 @@ var ts;
|
|
|
38612
38635
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38613
38636
|
description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
|
|
38614
38637
|
transpileOptionValue: true,
|
|
38615
|
-
defaultValueDescription:
|
|
38638
|
+
defaultValueDescription: false,
|
|
38616
38639
|
},
|
|
38617
38640
|
// Strict Type Checks
|
|
38618
38641
|
{
|
|
@@ -38623,7 +38646,7 @@ var ts;
|
|
|
38623
38646
|
showInSimplifiedHelpView: true,
|
|
38624
38647
|
category: ts.Diagnostics.Type_Checking,
|
|
38625
38648
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
38626
|
-
defaultValueDescription:
|
|
38649
|
+
defaultValueDescription: false,
|
|
38627
38650
|
},
|
|
38628
38651
|
{
|
|
38629
38652
|
name: "noImplicitAny",
|
|
@@ -38684,7 +38707,7 @@ var ts;
|
|
|
38684
38707
|
strictFlag: true,
|
|
38685
38708
|
category: ts.Diagnostics.Type_Checking,
|
|
38686
38709
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38687
|
-
defaultValueDescription:
|
|
38710
|
+
defaultValueDescription: false,
|
|
38688
38711
|
},
|
|
38689
38712
|
{
|
|
38690
38713
|
name: "alwaysStrict",
|
|
@@ -38702,7 +38725,7 @@ var ts;
|
|
|
38702
38725
|
affectsSemanticDiagnostics: true,
|
|
38703
38726
|
category: ts.Diagnostics.Type_Checking,
|
|
38704
38727
|
description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
|
|
38705
|
-
defaultValueDescription:
|
|
38728
|
+
defaultValueDescription: false,
|
|
38706
38729
|
},
|
|
38707
38730
|
{
|
|
38708
38731
|
name: "noUnusedParameters",
|
|
@@ -38710,7 +38733,7 @@ var ts;
|
|
|
38710
38733
|
affectsSemanticDiagnostics: true,
|
|
38711
38734
|
category: ts.Diagnostics.Type_Checking,
|
|
38712
38735
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
38713
|
-
defaultValueDescription:
|
|
38736
|
+
defaultValueDescription: false,
|
|
38714
38737
|
},
|
|
38715
38738
|
{
|
|
38716
38739
|
name: "exactOptionalPropertyTypes",
|
|
@@ -38718,7 +38741,7 @@ var ts;
|
|
|
38718
38741
|
affectsSemanticDiagnostics: true,
|
|
38719
38742
|
category: ts.Diagnostics.Type_Checking,
|
|
38720
38743
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38721
|
-
defaultValueDescription:
|
|
38744
|
+
defaultValueDescription: false,
|
|
38722
38745
|
},
|
|
38723
38746
|
{
|
|
38724
38747
|
name: "noImplicitReturns",
|
|
@@ -38726,7 +38749,7 @@ var ts;
|
|
|
38726
38749
|
affectsSemanticDiagnostics: true,
|
|
38727
38750
|
category: ts.Diagnostics.Type_Checking,
|
|
38728
38751
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
38729
|
-
defaultValueDescription:
|
|
38752
|
+
defaultValueDescription: false,
|
|
38730
38753
|
},
|
|
38731
38754
|
{
|
|
38732
38755
|
name: "noFallthroughCasesInSwitch",
|
|
@@ -38735,7 +38758,7 @@ var ts;
|
|
|
38735
38758
|
affectsSemanticDiagnostics: true,
|
|
38736
38759
|
category: ts.Diagnostics.Type_Checking,
|
|
38737
38760
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38738
|
-
defaultValueDescription:
|
|
38761
|
+
defaultValueDescription: false,
|
|
38739
38762
|
},
|
|
38740
38763
|
{
|
|
38741
38764
|
name: "noUncheckedIndexedAccess",
|
|
@@ -38743,7 +38766,7 @@ var ts;
|
|
|
38743
38766
|
affectsSemanticDiagnostics: true,
|
|
38744
38767
|
category: ts.Diagnostics.Type_Checking,
|
|
38745
38768
|
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38746
|
-
defaultValueDescription:
|
|
38769
|
+
defaultValueDescription: false,
|
|
38747
38770
|
},
|
|
38748
38771
|
{
|
|
38749
38772
|
name: "noImplicitOverride",
|
|
@@ -38751,7 +38774,7 @@ var ts;
|
|
|
38751
38774
|
affectsSemanticDiagnostics: true,
|
|
38752
38775
|
category: ts.Diagnostics.Type_Checking,
|
|
38753
38776
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38754
|
-
defaultValueDescription:
|
|
38777
|
+
defaultValueDescription: false,
|
|
38755
38778
|
},
|
|
38756
38779
|
{
|
|
38757
38780
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38759,7 +38782,7 @@ var ts;
|
|
|
38759
38782
|
showInSimplifiedHelpView: false,
|
|
38760
38783
|
category: ts.Diagnostics.Type_Checking,
|
|
38761
38784
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
38762
|
-
defaultValueDescription:
|
|
38785
|
+
defaultValueDescription: false,
|
|
38763
38786
|
},
|
|
38764
38787
|
// Module Resolution
|
|
38765
38788
|
{
|
|
@@ -38853,14 +38876,14 @@ var ts;
|
|
|
38853
38876
|
showInSimplifiedHelpView: true,
|
|
38854
38877
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38855
38878
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
38856
|
-
defaultValueDescription:
|
|
38879
|
+
defaultValueDescription: false,
|
|
38857
38880
|
},
|
|
38858
38881
|
{
|
|
38859
38882
|
name: "preserveSymlinks",
|
|
38860
38883
|
type: "boolean",
|
|
38861
38884
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38862
38885
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
38863
|
-
defaultValueDescription:
|
|
38886
|
+
defaultValueDescription: false,
|
|
38864
38887
|
},
|
|
38865
38888
|
{
|
|
38866
38889
|
name: "allowUmdGlobalAccess",
|
|
@@ -38868,7 +38891,7 @@ var ts;
|
|
|
38868
38891
|
affectsSemanticDiagnostics: true,
|
|
38869
38892
|
category: ts.Diagnostics.Modules,
|
|
38870
38893
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
38871
|
-
defaultValueDescription:
|
|
38894
|
+
defaultValueDescription: false,
|
|
38872
38895
|
},
|
|
38873
38896
|
// Source Maps
|
|
38874
38897
|
{
|
|
@@ -38893,7 +38916,7 @@ var ts;
|
|
|
38893
38916
|
affectsEmit: true,
|
|
38894
38917
|
category: ts.Diagnostics.Emit,
|
|
38895
38918
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
38896
|
-
defaultValueDescription:
|
|
38919
|
+
defaultValueDescription: false,
|
|
38897
38920
|
},
|
|
38898
38921
|
{
|
|
38899
38922
|
name: "inlineSources",
|
|
@@ -38901,7 +38924,7 @@ var ts;
|
|
|
38901
38924
|
affectsEmit: true,
|
|
38902
38925
|
category: ts.Diagnostics.Emit,
|
|
38903
38926
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
38904
|
-
defaultValueDescription:
|
|
38927
|
+
defaultValueDescription: false,
|
|
38905
38928
|
},
|
|
38906
38929
|
// Experimental
|
|
38907
38930
|
{
|
|
@@ -38910,7 +38933,7 @@ var ts;
|
|
|
38910
38933
|
affectsSemanticDiagnostics: true,
|
|
38911
38934
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38912
38935
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
38913
|
-
defaultValueDescription:
|
|
38936
|
+
defaultValueDescription: false,
|
|
38914
38937
|
},
|
|
38915
38938
|
{
|
|
38916
38939
|
name: "emitDecoratorMetadata",
|
|
@@ -38919,7 +38942,7 @@ var ts;
|
|
|
38919
38942
|
affectsEmit: true,
|
|
38920
38943
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38921
38944
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
38922
|
-
defaultValueDescription:
|
|
38945
|
+
defaultValueDescription: false,
|
|
38923
38946
|
},
|
|
38924
38947
|
// Advanced
|
|
38925
38948
|
{
|
|
@@ -38951,7 +38974,7 @@ var ts;
|
|
|
38951
38974
|
affectsModuleResolution: true,
|
|
38952
38975
|
category: ts.Diagnostics.Modules,
|
|
38953
38976
|
description: ts.Diagnostics.Enable_importing_json_files,
|
|
38954
|
-
defaultValueDescription:
|
|
38977
|
+
defaultValueDescription: false,
|
|
38955
38978
|
},
|
|
38956
38979
|
{
|
|
38957
38980
|
name: "out",
|
|
@@ -38977,7 +39000,7 @@ var ts;
|
|
|
38977
39000
|
type: "boolean",
|
|
38978
39001
|
category: ts.Diagnostics.Completeness,
|
|
38979
39002
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
38980
|
-
defaultValueDescription:
|
|
39003
|
+
defaultValueDescription: false,
|
|
38981
39004
|
},
|
|
38982
39005
|
{
|
|
38983
39006
|
name: "charset",
|
|
@@ -38992,7 +39015,7 @@ var ts;
|
|
|
38992
39015
|
affectsEmit: true,
|
|
38993
39016
|
category: ts.Diagnostics.Emit,
|
|
38994
39017
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
38995
|
-
defaultValueDescription:
|
|
39018
|
+
defaultValueDescription: false,
|
|
38996
39019
|
},
|
|
38997
39020
|
{
|
|
38998
39021
|
name: "newLine",
|
|
@@ -39012,7 +39035,7 @@ var ts;
|
|
|
39012
39035
|
affectsSemanticDiagnostics: true,
|
|
39013
39036
|
category: ts.Diagnostics.Output_Formatting,
|
|
39014
39037
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
39015
|
-
defaultValueDescription:
|
|
39038
|
+
defaultValueDescription: false,
|
|
39016
39039
|
},
|
|
39017
39040
|
{
|
|
39018
39041
|
name: "noLib",
|
|
@@ -39023,7 +39046,7 @@ var ts;
|
|
|
39023
39046
|
// We are not returning a sourceFile for lib file when asked by the program,
|
|
39024
39047
|
// so pass --noLib to avoid reporting a file not found error.
|
|
39025
39048
|
transpileOptionValue: true,
|
|
39026
|
-
defaultValueDescription:
|
|
39049
|
+
defaultValueDescription: false,
|
|
39027
39050
|
},
|
|
39028
39051
|
{
|
|
39029
39052
|
name: "noResolve",
|
|
@@ -39034,7 +39057,7 @@ var ts;
|
|
|
39034
39057
|
// We are not doing a full typecheck, we are not resolving the whole context,
|
|
39035
39058
|
// so pass --noResolve to avoid reporting missing file errors.
|
|
39036
39059
|
transpileOptionValue: true,
|
|
39037
|
-
defaultValueDescription:
|
|
39060
|
+
defaultValueDescription: false,
|
|
39038
39061
|
},
|
|
39039
39062
|
{
|
|
39040
39063
|
name: "stripInternal",
|
|
@@ -39042,7 +39065,7 @@ var ts;
|
|
|
39042
39065
|
affectsEmit: true,
|
|
39043
39066
|
category: ts.Diagnostics.Emit,
|
|
39044
39067
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
39045
|
-
defaultValueDescription:
|
|
39068
|
+
defaultValueDescription: false,
|
|
39046
39069
|
},
|
|
39047
39070
|
{
|
|
39048
39071
|
name: "disableSizeLimit",
|
|
@@ -39050,7 +39073,7 @@ var ts;
|
|
|
39050
39073
|
affectsProgramStructure: true,
|
|
39051
39074
|
category: ts.Diagnostics.Editor_Support,
|
|
39052
39075
|
description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
|
|
39053
|
-
defaultValueDescription:
|
|
39076
|
+
defaultValueDescription: false,
|
|
39054
39077
|
},
|
|
39055
39078
|
{
|
|
39056
39079
|
name: "disableSourceOfProjectReferenceRedirect",
|
|
@@ -39058,7 +39081,7 @@ var ts;
|
|
|
39058
39081
|
isTSConfigOnly: true,
|
|
39059
39082
|
category: ts.Diagnostics.Projects,
|
|
39060
39083
|
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39061
|
-
defaultValueDescription:
|
|
39084
|
+
defaultValueDescription: false,
|
|
39062
39085
|
},
|
|
39063
39086
|
{
|
|
39064
39087
|
name: "disableSolutionSearching",
|
|
@@ -39066,7 +39089,7 @@ var ts;
|
|
|
39066
39089
|
isTSConfigOnly: true,
|
|
39067
39090
|
category: ts.Diagnostics.Projects,
|
|
39068
39091
|
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39069
|
-
defaultValueDescription:
|
|
39092
|
+
defaultValueDescription: false,
|
|
39070
39093
|
},
|
|
39071
39094
|
{
|
|
39072
39095
|
name: "disableReferencedProjectLoad",
|
|
@@ -39074,7 +39097,7 @@ var ts;
|
|
|
39074
39097
|
isTSConfigOnly: true,
|
|
39075
39098
|
category: ts.Diagnostics.Projects,
|
|
39076
39099
|
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39077
|
-
defaultValueDescription:
|
|
39100
|
+
defaultValueDescription: false,
|
|
39078
39101
|
},
|
|
39079
39102
|
{
|
|
39080
39103
|
name: "noImplicitUseStrict",
|
|
@@ -39082,7 +39105,7 @@ var ts;
|
|
|
39082
39105
|
affectsSemanticDiagnostics: true,
|
|
39083
39106
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39084
39107
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
39085
|
-
defaultValueDescription:
|
|
39108
|
+
defaultValueDescription: false,
|
|
39086
39109
|
},
|
|
39087
39110
|
{
|
|
39088
39111
|
name: "noEmitHelpers",
|
|
@@ -39090,7 +39113,7 @@ var ts;
|
|
|
39090
39113
|
affectsEmit: true,
|
|
39091
39114
|
category: ts.Diagnostics.Emit,
|
|
39092
39115
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
39093
|
-
defaultValueDescription:
|
|
39116
|
+
defaultValueDescription: false,
|
|
39094
39117
|
},
|
|
39095
39118
|
{
|
|
39096
39119
|
name: "noEmitOnError",
|
|
@@ -39099,7 +39122,7 @@ var ts;
|
|
|
39099
39122
|
category: ts.Diagnostics.Emit,
|
|
39100
39123
|
transpileOptionValue: undefined,
|
|
39101
39124
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
39102
|
-
defaultValueDescription:
|
|
39125
|
+
defaultValueDescription: false,
|
|
39103
39126
|
},
|
|
39104
39127
|
{
|
|
39105
39128
|
name: "preserveConstEnums",
|
|
@@ -39107,7 +39130,7 @@ var ts;
|
|
|
39107
39130
|
affectsEmit: true,
|
|
39108
39131
|
category: ts.Diagnostics.Emit,
|
|
39109
39132
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39110
|
-
defaultValueDescription:
|
|
39133
|
+
defaultValueDescription: false,
|
|
39111
39134
|
},
|
|
39112
39135
|
{
|
|
39113
39136
|
name: "declarationDir",
|
|
@@ -39124,7 +39147,7 @@ var ts;
|
|
|
39124
39147
|
type: "boolean",
|
|
39125
39148
|
category: ts.Diagnostics.Completeness,
|
|
39126
39149
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
39127
|
-
defaultValueDescription:
|
|
39150
|
+
defaultValueDescription: false,
|
|
39128
39151
|
},
|
|
39129
39152
|
{
|
|
39130
39153
|
name: "allowUnusedLabels",
|
|
@@ -39133,7 +39156,7 @@ var ts;
|
|
|
39133
39156
|
affectsSemanticDiagnostics: true,
|
|
39134
39157
|
category: ts.Diagnostics.Type_Checking,
|
|
39135
39158
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
39136
|
-
defaultValueDescription:
|
|
39159
|
+
defaultValueDescription: undefined,
|
|
39137
39160
|
},
|
|
39138
39161
|
{
|
|
39139
39162
|
name: "allowUnreachableCode",
|
|
@@ -39142,7 +39165,7 @@ var ts;
|
|
|
39142
39165
|
affectsSemanticDiagnostics: true,
|
|
39143
39166
|
category: ts.Diagnostics.Type_Checking,
|
|
39144
39167
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
39145
|
-
defaultValueDescription:
|
|
39168
|
+
defaultValueDescription: undefined,
|
|
39146
39169
|
},
|
|
39147
39170
|
{
|
|
39148
39171
|
name: "suppressExcessPropertyErrors",
|
|
@@ -39150,7 +39173,7 @@ var ts;
|
|
|
39150
39173
|
affectsSemanticDiagnostics: true,
|
|
39151
39174
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39152
39175
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
39153
|
-
defaultValueDescription:
|
|
39176
|
+
defaultValueDescription: false,
|
|
39154
39177
|
},
|
|
39155
39178
|
{
|
|
39156
39179
|
name: "suppressImplicitAnyIndexErrors",
|
|
@@ -39158,7 +39181,7 @@ var ts;
|
|
|
39158
39181
|
affectsSemanticDiagnostics: true,
|
|
39159
39182
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39160
39183
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
39161
|
-
defaultValueDescription:
|
|
39184
|
+
defaultValueDescription: false,
|
|
39162
39185
|
},
|
|
39163
39186
|
{
|
|
39164
39187
|
name: "forceConsistentCasingInFileNames",
|
|
@@ -39166,7 +39189,7 @@ var ts;
|
|
|
39166
39189
|
affectsModuleResolution: true,
|
|
39167
39190
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39168
39191
|
description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
39169
|
-
defaultValueDescription:
|
|
39192
|
+
defaultValueDescription: false,
|
|
39170
39193
|
},
|
|
39171
39194
|
{
|
|
39172
39195
|
name: "maxNodeModuleJsDepth",
|
|
@@ -39174,7 +39197,7 @@ var ts;
|
|
|
39174
39197
|
affectsModuleResolution: true,
|
|
39175
39198
|
category: ts.Diagnostics.JavaScript_Support,
|
|
39176
39199
|
description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
|
|
39177
|
-
defaultValueDescription:
|
|
39200
|
+
defaultValueDescription: 0,
|
|
39178
39201
|
},
|
|
39179
39202
|
{
|
|
39180
39203
|
name: "noStrictGenericChecks",
|
|
@@ -39182,7 +39205,7 @@ var ts;
|
|
|
39182
39205
|
affectsSemanticDiagnostics: true,
|
|
39183
39206
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39184
39207
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
39185
|
-
defaultValueDescription:
|
|
39208
|
+
defaultValueDescription: false,
|
|
39186
39209
|
},
|
|
39187
39210
|
{
|
|
39188
39211
|
name: "useDefineForClassFields",
|
|
@@ -39199,14 +39222,14 @@ var ts;
|
|
|
39199
39222
|
affectsEmit: true,
|
|
39200
39223
|
category: ts.Diagnostics.Emit,
|
|
39201
39224
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39202
|
-
defaultValueDescription:
|
|
39225
|
+
defaultValueDescription: false,
|
|
39203
39226
|
},
|
|
39204
39227
|
{
|
|
39205
39228
|
name: "keyofStringsOnly",
|
|
39206
39229
|
type: "boolean",
|
|
39207
39230
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39208
39231
|
description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
|
|
39209
|
-
defaultValueDescription:
|
|
39232
|
+
defaultValueDescription: false,
|
|
39210
39233
|
},
|
|
39211
39234
|
{
|
|
39212
39235
|
// A list of plugins to load in the language service
|
|
@@ -39248,7 +39271,7 @@ var ts;
|
|
|
39248
39271
|
category: ts.Diagnostics.Command_line_Options,
|
|
39249
39272
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39250
39273
|
type: "boolean",
|
|
39251
|
-
defaultValueDescription:
|
|
39274
|
+
defaultValueDescription: false,
|
|
39252
39275
|
},
|
|
39253
39276
|
{
|
|
39254
39277
|
name: "dry",
|
|
@@ -39256,7 +39279,7 @@ var ts;
|
|
|
39256
39279
|
category: ts.Diagnostics.Command_line_Options,
|
|
39257
39280
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39258
39281
|
type: "boolean",
|
|
39259
|
-
defaultValueDescription:
|
|
39282
|
+
defaultValueDescription: false,
|
|
39260
39283
|
},
|
|
39261
39284
|
{
|
|
39262
39285
|
name: "force",
|
|
@@ -39264,14 +39287,14 @@ var ts;
|
|
|
39264
39287
|
category: ts.Diagnostics.Command_line_Options,
|
|
39265
39288
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39266
39289
|
type: "boolean",
|
|
39267
|
-
defaultValueDescription:
|
|
39290
|
+
defaultValueDescription: false,
|
|
39268
39291
|
},
|
|
39269
39292
|
{
|
|
39270
39293
|
name: "clean",
|
|
39271
39294
|
category: ts.Diagnostics.Command_line_Options,
|
|
39272
39295
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39273
39296
|
type: "boolean",
|
|
39274
|
-
defaultValueDescription:
|
|
39297
|
+
defaultValueDescription: false,
|
|
39275
39298
|
}
|
|
39276
39299
|
];
|
|
39277
39300
|
/* @internal */
|
|
@@ -39284,12 +39307,12 @@ var ts;
|
|
|
39284
39307
|
*/
|
|
39285
39308
|
name: "enableAutoDiscovery",
|
|
39286
39309
|
type: "boolean",
|
|
39287
|
-
defaultValueDescription:
|
|
39310
|
+
defaultValueDescription: false,
|
|
39288
39311
|
},
|
|
39289
39312
|
{
|
|
39290
39313
|
name: "enable",
|
|
39291
39314
|
type: "boolean",
|
|
39292
|
-
defaultValueDescription:
|
|
39315
|
+
defaultValueDescription: false,
|
|
39293
39316
|
},
|
|
39294
39317
|
{
|
|
39295
39318
|
name: "include",
|
|
@@ -39310,7 +39333,7 @@ var ts;
|
|
|
39310
39333
|
{
|
|
39311
39334
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39312
39335
|
type: "boolean",
|
|
39313
|
-
defaultValueDescription:
|
|
39336
|
+
defaultValueDescription: false,
|
|
39314
39337
|
},
|
|
39315
39338
|
];
|
|
39316
39339
|
/*@internal*/
|
|
@@ -46829,6 +46852,7 @@ var ts;
|
|
|
46829
46852
|
getIndexInfosOfType: getIndexInfosOfType,
|
|
46830
46853
|
getSignaturesOfType: getSignaturesOfType,
|
|
46831
46854
|
getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType); },
|
|
46855
|
+
getIndexType: function (type) { return getIndexType(type); },
|
|
46832
46856
|
getBaseTypes: getBaseTypes,
|
|
46833
46857
|
getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
|
|
46834
46858
|
getWidenedType: getWidenedType,
|
|
@@ -48086,11 +48110,12 @@ var ts;
|
|
|
48086
48110
|
*
|
|
48087
48111
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48088
48112
|
*/
|
|
48089
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48113
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
48090
48114
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48091
|
-
|
|
48115
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
48116
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
48092
48117
|
}
|
|
48093
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48118
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
48094
48119
|
var _a, _b, _c;
|
|
48095
48120
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48096
48121
|
var result;
|
|
@@ -48407,7 +48432,7 @@ var ts;
|
|
|
48407
48432
|
}
|
|
48408
48433
|
}
|
|
48409
48434
|
if (!result) {
|
|
48410
|
-
if (nameNotFoundMessage) {
|
|
48435
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48411
48436
|
if (!errorLocation ||
|
|
48412
48437
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
|
|
48413
48438
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -48417,7 +48442,7 @@ var ts;
|
|
|
48417
48442
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48418
48443
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48419
48444
|
var suggestion = void 0;
|
|
48420
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
48445
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
48421
48446
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48422
48447
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48423
48448
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48453,7 +48478,7 @@ var ts;
|
|
|
48453
48478
|
return undefined;
|
|
48454
48479
|
}
|
|
48455
48480
|
// Perform extra checks only if error reporting was requested
|
|
48456
|
-
if (nameNotFoundMessage) {
|
|
48481
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48457
48482
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
|
|
48458
48483
|
// We have a match, but the reference occurred within a property initializer and the identifier also binds
|
|
48459
48484
|
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
|
|
@@ -50929,7 +50954,7 @@ var ts;
|
|
|
50929
50954
|
context.approximateLength += 6;
|
|
50930
50955
|
return ts.factory.createKeywordTypeNode(147 /* ObjectKeyword */);
|
|
50931
50956
|
}
|
|
50932
|
-
if (isThisTypeParameter(type)) {
|
|
50957
|
+
if (ts.isThisTypeParameter(type)) {
|
|
50933
50958
|
if (context.flags & 4194304 /* InObjectTypeLiteral */) {
|
|
50934
50959
|
if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
|
|
50935
50960
|
context.encounteredError = true;
|
|
@@ -58874,7 +58899,7 @@ var ts;
|
|
|
58874
58899
|
}
|
|
58875
58900
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
58876
58901
|
// Don't track references for global symbols anyway, so value if `isReference` is arbitrary
|
|
58877
|
-
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
|
|
58902
|
+
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
|
|
58878
58903
|
}
|
|
58879
58904
|
function getGlobalType(name, arity, reportErrors) {
|
|
58880
58905
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -60453,9 +60478,6 @@ var ts;
|
|
|
60453
60478
|
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
|
|
60454
60479
|
(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
|
|
60455
60480
|
}
|
|
60456
|
-
function isThisTypeParameter(type) {
|
|
60457
|
-
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
60458
|
-
}
|
|
60459
60481
|
function getSimplifiedType(type, writing) {
|
|
60460
60482
|
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
|
|
60461
60483
|
type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) :
|
|
@@ -65653,7 +65675,7 @@ var ts;
|
|
|
65653
65675
|
// flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns
|
|
65654
65676
|
// no flags for all other types (including non-falsy literal types).
|
|
65655
65677
|
function getFalsyFlags(type) {
|
|
65656
|
-
return type.flags &
|
|
65678
|
+
return type.flags & 3145728 /* UnionOrIntersection */ ? getFalsyFlagsOfTypes(type.types) :
|
|
65657
65679
|
type.flags & 128 /* StringLiteral */ ? type.value === "" ? 128 /* StringLiteral */ : 0 :
|
|
65658
65680
|
type.flags & 256 /* NumberLiteral */ ? type.value === 0 ? 256 /* NumberLiteral */ : 0 :
|
|
65659
65681
|
type.flags & 2048 /* BigIntLiteral */ ? isZeroBigInt(type) ? 2048 /* BigIntLiteral */ : 0 :
|
|
@@ -67269,6 +67291,11 @@ var ts;
|
|
|
67269
67291
|
case "BigInt64Array":
|
|
67270
67292
|
case "BigUint64Array":
|
|
67271
67293
|
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;
|
|
67294
|
+
case "await":
|
|
67295
|
+
if (ts.isCallExpression(node.parent)) {
|
|
67296
|
+
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
67297
|
+
}
|
|
67298
|
+
// falls through
|
|
67272
67299
|
default:
|
|
67273
67300
|
if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
|
|
67274
67301
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
@@ -68826,7 +68853,7 @@ var ts;
|
|
|
68826
68853
|
function narrowByInKeyword(type, name, assumeTrue) {
|
|
68827
68854
|
if (type.flags & 1048576 /* Union */
|
|
68828
68855
|
|| type.flags & 524288 /* Object */ && declaredType !== type
|
|
68829
|
-
|| isThisTypeParameter(type)
|
|
68856
|
+
|| ts.isThisTypeParameter(type)
|
|
68830
68857
|
|| type.flags & 2097152 /* Intersection */ && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
|
|
68831
68858
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
68832
68859
|
}
|
|
@@ -71646,15 +71673,9 @@ var ts;
|
|
|
71646
71673
|
}
|
|
71647
71674
|
}
|
|
71648
71675
|
function isValidSpreadType(type) {
|
|
71649
|
-
|
|
71650
|
-
|
|
71651
|
-
|
|
71652
|
-
return isValidSpreadType(constraint);
|
|
71653
|
-
}
|
|
71654
|
-
}
|
|
71655
|
-
return !!(type.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71656
|
-
getFalsyFlags(type) & 117632 /* DefinitelyFalsy */ && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
|
|
71657
|
-
type.flags & 3145728 /* UnionOrIntersection */ && ts.every(type.types, isValidSpreadType));
|
|
71676
|
+
var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
|
|
71677
|
+
return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71678
|
+
t.flags & 3145728 /* UnionOrIntersection */ && ts.every(t.types, isValidSpreadType));
|
|
71658
71679
|
}
|
|
71659
71680
|
function checkJsxSelfClosingElementDeferred(node) {
|
|
71660
71681
|
checkJsxOpeningLikeElementOrOpeningFragment(node);
|
|
@@ -72605,7 +72626,7 @@ var ts;
|
|
|
72605
72626
|
}
|
|
72606
72627
|
var propType;
|
|
72607
72628
|
if (!prop) {
|
|
72608
|
-
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
|
|
72629
|
+
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
|
|
72609
72630
|
getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
|
|
72610
72631
|
if (!(indexInfo && indexInfo.type)) {
|
|
72611
72632
|
var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, /*excludeClasses*/ true);
|
|
@@ -72622,7 +72643,7 @@ var ts;
|
|
|
72622
72643
|
return anyType;
|
|
72623
72644
|
}
|
|
72624
72645
|
if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
|
|
72625
|
-
reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72646
|
+
reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72626
72647
|
}
|
|
72627
72648
|
return errorType;
|
|
72628
72649
|
}
|
|
@@ -72915,7 +72936,7 @@ var ts;
|
|
|
72915
72936
|
}
|
|
72916
72937
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
72917
72938
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
72918
|
-
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
|
|
72939
|
+
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
|
|
72919
72940
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
72920
72941
|
var symbol = getSymbol(symbols, name, meaning);
|
|
72921
72942
|
// 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
|
|
@@ -73161,7 +73182,7 @@ var ts;
|
|
|
73161
73182
|
}
|
|
73162
73183
|
var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
|
|
73163
73184
|
var accessFlags = ts.isAssignmentTarget(node) ?
|
|
73164
|
-
4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73185
|
+
4 /* Writing */ | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73165
73186
|
32 /* ExpressionPosition */;
|
|
73166
73187
|
var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
|
|
73167
73188
|
return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
|
|
@@ -86623,18 +86644,22 @@ var ts;
|
|
|
86623
86644
|
return false;
|
|
86624
86645
|
}
|
|
86625
86646
|
function checkNumericLiteralValueSize(node) {
|
|
86647
|
+
// We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
|
|
86648
|
+
// e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
|
|
86649
|
+
var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
|
|
86650
|
+
var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
86626
86651
|
// Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
|
|
86627
|
-
// Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
|
|
86628
86652
|
// Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
|
|
86629
|
-
if (
|
|
86653
|
+
if (isFractional || isScientific) {
|
|
86630
86654
|
return;
|
|
86631
86655
|
}
|
|
86632
|
-
//
|
|
86633
|
-
//
|
|
86634
|
-
//
|
|
86635
|
-
//
|
|
86636
|
-
|
|
86637
|
-
|
|
86656
|
+
// Here `node` is guaranteed to be a numeric literal representing an integer.
|
|
86657
|
+
// We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
|
|
86658
|
+
// 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
|
|
86659
|
+
// 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
|
|
86660
|
+
// thus the result of the predicate won't be affected.
|
|
86661
|
+
var value = +node.text;
|
|
86662
|
+
if (value <= Math.pow(2, 53) - 1) {
|
|
86638
86663
|
return;
|
|
86639
86664
|
}
|
|
86640
86665
|
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));
|
|
@@ -90096,7 +90121,7 @@ var ts;
|
|
|
90096
90121
|
// ], C.prototype, "prop");
|
|
90097
90122
|
//
|
|
90098
90123
|
var prefix = getClassMemberPrefix(node, member);
|
|
90099
|
-
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/
|
|
90124
|
+
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
|
|
90100
90125
|
var descriptor = languageVersion > 0 /* ES3 */
|
|
90101
90126
|
? member.kind === 166 /* PropertyDeclaration */
|
|
90102
90127
|
// We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it
|
|
@@ -127600,7 +127625,7 @@ var ts;
|
|
|
127600
127625
|
case 0 /* Paths */:
|
|
127601
127626
|
return convertPathCompletions(completion.paths);
|
|
127602
127627
|
case 1 /* Properties */: {
|
|
127603
|
-
var entries =
|
|
127628
|
+
var entries = ts.createSortedArray();
|
|
127604
127629
|
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
|
|
127605
127630
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan: optionalReplacementSpan, entries: entries };
|
|
127606
127631
|
}
|
|
@@ -127798,7 +127823,7 @@ var ts;
|
|
|
127798
127823
|
var types = ts.flatMap(candidates, function (candidate) {
|
|
127799
127824
|
if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
127800
127825
|
return;
|
|
127801
|
-
var type =
|
|
127826
|
+
var type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex);
|
|
127802
127827
|
isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
|
|
127803
127828
|
return getStringLiteralTypes(type, uniques);
|
|
127804
127829
|
});
|
|
@@ -128482,6 +128507,29 @@ var ts;
|
|
|
128482
128507
|
}
|
|
128483
128508
|
}
|
|
128484
128509
|
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
|
|
128510
|
+
// Editors will use the `sortText` and then fall back to `name` for sorting, but leave ties in response order.
|
|
128511
|
+
// So, it's important that we sort those ties in the order we want them displayed if it matters. We don't
|
|
128512
|
+
// strictly need to sort by name or SortText here since clients are going to do it anyway, but we have to
|
|
128513
|
+
// do the work of comparing them so we can sort those ties appropriately; plus, it makes the order returned
|
|
128514
|
+
// by the language service consistent with what TS Server does and what editors typically do. This also makes
|
|
128515
|
+
// completions tests make more sense. We used to sort only alphabetically and only in the server layer, but
|
|
128516
|
+
// this made tests really weird, since most fourslash tests don't use the server.
|
|
128517
|
+
function compareCompletionEntries(entryInArray, entryToInsert) {
|
|
128518
|
+
var _a, _b;
|
|
128519
|
+
var result = ts.compareStringsCaseSensitiveUI(entryInArray.sortText, entryToInsert.sortText);
|
|
128520
|
+
if (result === 0 /* EqualTo */) {
|
|
128521
|
+
result = ts.compareStringsCaseSensitiveUI(entryInArray.name, entryToInsert.name);
|
|
128522
|
+
}
|
|
128523
|
+
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)) {
|
|
128524
|
+
// Sort same-named auto-imports by module specifier
|
|
128525
|
+
result = ts.compareNumberOfDirectorySeparators(entryInArray.data.moduleSpecifier, entryToInsert.data.moduleSpecifier);
|
|
128526
|
+
}
|
|
128527
|
+
if (result === 0 /* EqualTo */) {
|
|
128528
|
+
// Fall back to symbol order - if we return `EqualTo`, `insertSorted` will put later symbols first.
|
|
128529
|
+
return -1 /* LessThan */;
|
|
128530
|
+
}
|
|
128531
|
+
return result;
|
|
128532
|
+
}
|
|
128485
128533
|
function completionEntryDataIsResolved(data) {
|
|
128486
128534
|
return !!(data === null || data === void 0 ? void 0 : data.moduleSpecifier);
|
|
128487
128535
|
}
|
|
@@ -128568,7 +128616,7 @@ var ts;
|
|
|
128568
128616
|
return completionInfo;
|
|
128569
128617
|
}
|
|
128570
128618
|
}
|
|
128571
|
-
var entries =
|
|
128619
|
+
var entries = ts.createSortedArray();
|
|
128572
128620
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
128573
128621
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
128574
128622
|
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
@@ -128586,13 +128634,13 @@ var ts;
|
|
|
128586
128634
|
for (var _i = 0, _a = getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && ts.isSourceFileJS(sourceFile)); _i < _a.length; _i++) {
|
|
128587
128635
|
var keywordEntry = _a[_i];
|
|
128588
128636
|
if (!entryNames.has(keywordEntry.name)) {
|
|
128589
|
-
|
|
128637
|
+
ts.insertSorted(entries, keywordEntry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
128590
128638
|
}
|
|
128591
128639
|
}
|
|
128592
128640
|
}
|
|
128593
128641
|
for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) {
|
|
128594
128642
|
var literal = literals_1[_b];
|
|
128595
|
-
|
|
128643
|
+
ts.insertSorted(entries, createCompletionEntryForLiteral(sourceFile, preferences, literal), compareCompletionEntries, /*allowDuplicates*/ true);
|
|
128596
128644
|
}
|
|
128597
128645
|
return {
|
|
128598
128646
|
isGlobalCompletion: isInSnippetScope,
|
|
@@ -128668,13 +128716,13 @@ var ts;
|
|
|
128668
128716
|
var realName = ts.unescapeLeadingUnderscores(name);
|
|
128669
128717
|
if (!uniqueNames.has(realName) && ts.isIdentifierText(realName, target)) {
|
|
128670
128718
|
uniqueNames.add(realName);
|
|
128671
|
-
|
|
128719
|
+
ts.insertSorted(entries, {
|
|
128672
128720
|
name: realName,
|
|
128673
128721
|
kind: "warning" /* warning */,
|
|
128674
128722
|
kindModifiers: "",
|
|
128675
128723
|
sortText: SortText.JavascriptIdentifiers,
|
|
128676
128724
|
isFromUncheckedFile: true
|
|
128677
|
-
});
|
|
128725
|
+
}, compareCompletionEntries);
|
|
128678
128726
|
}
|
|
128679
128727
|
});
|
|
128680
128728
|
}
|
|
@@ -129098,7 +129146,7 @@ var ts;
|
|
|
129098
129146
|
/** True for locals; false for globals, module exports from other files, `this.` completions. */
|
|
129099
129147
|
var shouldShadowLaterSymbols = !origin && !(symbol.parent === undefined && !ts.some(symbol.declarations, function (d) { return d.getSourceFile() === location.getSourceFile(); }));
|
|
129100
129148
|
uniques.set(name, shouldShadowLaterSymbols);
|
|
129101
|
-
|
|
129149
|
+
ts.insertSorted(entries, entry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
129102
129150
|
}
|
|
129103
129151
|
log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
|
|
129104
129152
|
// Prevent consumers of this map from having to worry about
|
|
@@ -151575,6 +151623,7 @@ var ts;
|
|
|
151575
151623
|
var errorCodes = [
|
|
151576
151624
|
ts.Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
151577
151625
|
ts.Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
151626
|
+
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code
|
|
151578
151627
|
];
|
|
151579
151628
|
codefix.registerCodeFix({
|
|
151580
151629
|
errorCodes: errorCodes,
|
|
@@ -159385,6 +159434,9 @@ var ts;
|
|
|
159385
159434
|
TypeObject.prototype.isClass = function () {
|
|
159386
159435
|
return !!(ts.getObjectFlags(this) & 1 /* Class */);
|
|
159387
159436
|
};
|
|
159437
|
+
TypeObject.prototype.isIndexType = function () {
|
|
159438
|
+
return !!(this.flags & 4194304 /* Index */);
|
|
159439
|
+
};
|
|
159388
159440
|
Object.defineProperty(TypeObject.prototype, "typeArguments", {
|
|
159389
159441
|
/**
|
|
159390
159442
|
* This polyfills `referenceType.typeArguments` for API consumers
|
|
@@ -159417,6 +159469,16 @@ var ts;
|
|
|
159417
159469
|
SignatureObject.prototype.getReturnType = function () {
|
|
159418
159470
|
return this.checker.getReturnTypeOfSignature(this);
|
|
159419
159471
|
};
|
|
159472
|
+
SignatureObject.prototype.getTypeParameterAtPosition = function (pos) {
|
|
159473
|
+
var type = this.checker.getParameterType(this, pos);
|
|
159474
|
+
if (type.isIndexType() && ts.isThisTypeParameter(type.type)) {
|
|
159475
|
+
var constraint = type.type.getConstraint();
|
|
159476
|
+
if (constraint) {
|
|
159477
|
+
return this.checker.getIndexType(constraint);
|
|
159478
|
+
}
|
|
159479
|
+
}
|
|
159480
|
+
return type;
|
|
159481
|
+
};
|
|
159420
159482
|
SignatureObject.prototype.getDocumentationComment = function () {
|
|
159421
159483
|
return this.documentationComment || (this.documentationComment = getDocumentationComment(ts.singleElementArray(this.declaration), this.checker));
|
|
159422
159484
|
};
|
|
@@ -171762,14 +171824,14 @@ var ts;
|
|
|
171762
171824
|
if (kind === "completions-full" /* CompletionsFull */)
|
|
171763
171825
|
return completions;
|
|
171764
171826
|
var prefix = args.prefix || "";
|
|
171765
|
-
var entries = ts.
|
|
171827
|
+
var entries = ts.mapDefined(completions.entries, function (entry) {
|
|
171766
171828
|
if (completions.isMemberCompletion || ts.startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) {
|
|
171767
171829
|
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;
|
|
171768
171830
|
var convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : undefined;
|
|
171769
171831
|
// Use `hasAction || undefined` to avoid serializing `false`.
|
|
171770
171832
|
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 };
|
|
171771
171833
|
}
|
|
171772
|
-
})
|
|
171834
|
+
});
|
|
171773
171835
|
if (kind === "completions" /* Completions */) {
|
|
171774
171836
|
if (completions.metadata)
|
|
171775
171837
|
entries.metadata = completions.metadata;
|