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/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211204";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -1037,7 +1037,11 @@ var ts;
|
|
|
1037
1037
|
}
|
|
1038
1038
|
return deduplicated;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function createSortedArray() {
|
|
1041
|
+
return []; // TODO: GH#19873
|
|
1042
|
+
}
|
|
1043
|
+
ts.createSortedArray = createSortedArray;
|
|
1044
|
+
function insertSorted(array, insert, compare, allowDuplicates) {
|
|
1041
1045
|
if (array.length === 0) {
|
|
1042
1046
|
array.push(insert);
|
|
1043
1047
|
return;
|
|
@@ -1046,6 +1050,9 @@ var ts;
|
|
|
1046
1050
|
if (insertIndex < 0) {
|
|
1047
1051
|
array.splice(~insertIndex, 0, insert);
|
|
1048
1052
|
}
|
|
1053
|
+
else if (allowDuplicates) {
|
|
1054
|
+
array.splice(insertIndex, 0, insert);
|
|
1055
|
+
}
|
|
1049
1056
|
}
|
|
1050
1057
|
ts.insertSorted = insertSorted;
|
|
1051
1058
|
function sortAndDeduplicate(array, comparer, equalityComparer) {
|
|
@@ -8411,6 +8418,7 @@ var ts;
|
|
|
8411
8418
|
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."),
|
|
8412
8419
|
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."),
|
|
8413
8420
|
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."),
|
|
8421
|
+
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?"),
|
|
8414
8422
|
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."),
|
|
8415
8423
|
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."),
|
|
8416
8424
|
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)."),
|
|
@@ -20952,6 +20960,10 @@ var ts;
|
|
|
20952
20960
|
return text.replace(/\$/gm, "\\$");
|
|
20953
20961
|
}
|
|
20954
20962
|
ts.escapeSnippetText = escapeSnippetText;
|
|
20963
|
+
function isThisTypeParameter(type) {
|
|
20964
|
+
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
20965
|
+
}
|
|
20966
|
+
ts.isThisTypeParameter = isThisTypeParameter;
|
|
20955
20967
|
})(ts || (ts = {}));
|
|
20956
20968
|
/* @internal */
|
|
20957
20969
|
var ts;
|
|
@@ -33802,9 +33814,10 @@ var ts;
|
|
|
33802
33814
|
// - "(x,y)" is a comma expression parsed as a signature with two parameters.
|
|
33803
33815
|
// - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
|
|
33804
33816
|
// - "a ? (b): function() {}" will too, since function() is a valid JSDoc function type.
|
|
33817
|
+
// - "a ? (b): (function() {})" as well, but inside of a parenthesized type.
|
|
33805
33818
|
//
|
|
33806
33819
|
// So we need just a bit of lookahead to ensure that it can only be a signature.
|
|
33807
|
-
var hasJSDocFunctionType = type && ts.isJSDocFunctionType(type);
|
|
33820
|
+
var hasJSDocFunctionType = type && (ts.isJSDocFunctionType(type) || ts.isParenthesizedTypeNode(type) && ts.isJSDocFunctionType(type.type));
|
|
33808
33821
|
if (!allowAmbiguity && token() !== 38 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 18 /* OpenBraceToken */)) {
|
|
33809
33822
|
// Returning undefined here will cause our caller to rewind to where we started from.
|
|
33810
33823
|
return undefined;
|
|
@@ -38203,7 +38216,11 @@ var ts;
|
|
|
38203
38216
|
var ts;
|
|
38204
38217
|
(function (ts) {
|
|
38205
38218
|
/* @internal */
|
|
38206
|
-
ts.compileOnSaveCommandLineOption = {
|
|
38219
|
+
ts.compileOnSaveCommandLineOption = {
|
|
38220
|
+
name: "compileOnSave",
|
|
38221
|
+
type: "boolean",
|
|
38222
|
+
defaultValueDescription: false,
|
|
38223
|
+
};
|
|
38207
38224
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
38208
38225
|
"preserve": 1 /* Preserve */,
|
|
38209
38226
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38317,6 +38334,7 @@ var ts;
|
|
|
38317
38334
|
})),
|
|
38318
38335
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38319
38336
|
description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
38337
|
+
defaultValueDescription: ts.WatchFileKind.UseFsEvents,
|
|
38320
38338
|
},
|
|
38321
38339
|
{
|
|
38322
38340
|
name: "watchDirectory",
|
|
@@ -38328,6 +38346,7 @@ var ts;
|
|
|
38328
38346
|
})),
|
|
38329
38347
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38330
38348
|
description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
38349
|
+
defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
|
|
38331
38350
|
},
|
|
38332
38351
|
{
|
|
38333
38352
|
name: "fallbackPolling",
|
|
@@ -38339,13 +38358,14 @@ var ts;
|
|
|
38339
38358
|
})),
|
|
38340
38359
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38341
38360
|
description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
|
|
38361
|
+
defaultValueDescription: ts.PollingWatchKind.PriorityInterval,
|
|
38342
38362
|
},
|
|
38343
38363
|
{
|
|
38344
38364
|
name: "synchronousWatchDirectory",
|
|
38345
38365
|
type: "boolean",
|
|
38346
38366
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38347
38367
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38348
|
-
defaultValueDescription:
|
|
38368
|
+
defaultValueDescription: false,
|
|
38349
38369
|
},
|
|
38350
38370
|
{
|
|
38351
38371
|
name: "excludeDirectories",
|
|
@@ -38381,13 +38401,13 @@ var ts;
|
|
|
38381
38401
|
showInSimplifiedHelpView: true,
|
|
38382
38402
|
category: ts.Diagnostics.Command_line_Options,
|
|
38383
38403
|
description: ts.Diagnostics.Print_this_message,
|
|
38384
|
-
defaultValueDescription:
|
|
38404
|
+
defaultValueDescription: false,
|
|
38385
38405
|
},
|
|
38386
38406
|
{
|
|
38387
38407
|
name: "help",
|
|
38388
38408
|
shortName: "?",
|
|
38389
38409
|
type: "boolean",
|
|
38390
|
-
defaultValueDescription:
|
|
38410
|
+
defaultValueDescription: false,
|
|
38391
38411
|
},
|
|
38392
38412
|
{
|
|
38393
38413
|
name: "watch",
|
|
@@ -38397,7 +38417,7 @@ var ts;
|
|
|
38397
38417
|
isCommandLineOnly: true,
|
|
38398
38418
|
category: ts.Diagnostics.Command_line_Options,
|
|
38399
38419
|
description: ts.Diagnostics.Watch_input_files,
|
|
38400
|
-
defaultValueDescription:
|
|
38420
|
+
defaultValueDescription: false,
|
|
38401
38421
|
},
|
|
38402
38422
|
{
|
|
38403
38423
|
name: "preserveWatchOutput",
|
|
@@ -38405,28 +38425,28 @@ var ts;
|
|
|
38405
38425
|
showInSimplifiedHelpView: false,
|
|
38406
38426
|
category: ts.Diagnostics.Output_Formatting,
|
|
38407
38427
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38408
|
-
defaultValueDescription:
|
|
38428
|
+
defaultValueDescription: false,
|
|
38409
38429
|
},
|
|
38410
38430
|
{
|
|
38411
38431
|
name: "listFiles",
|
|
38412
38432
|
type: "boolean",
|
|
38413
38433
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38414
38434
|
description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
|
|
38415
|
-
defaultValueDescription:
|
|
38435
|
+
defaultValueDescription: false,
|
|
38416
38436
|
},
|
|
38417
38437
|
{
|
|
38418
38438
|
name: "explainFiles",
|
|
38419
38439
|
type: "boolean",
|
|
38420
38440
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38421
38441
|
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38422
|
-
defaultValueDescription:
|
|
38442
|
+
defaultValueDescription: false,
|
|
38423
38443
|
},
|
|
38424
38444
|
{
|
|
38425
38445
|
name: "listEmittedFiles",
|
|
38426
38446
|
type: "boolean",
|
|
38427
38447
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38428
38448
|
description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
|
|
38429
|
-
defaultValueDescription:
|
|
38449
|
+
defaultValueDescription: false,
|
|
38430
38450
|
},
|
|
38431
38451
|
{
|
|
38432
38452
|
name: "pretty",
|
|
@@ -38434,28 +38454,28 @@ var ts;
|
|
|
38434
38454
|
showInSimplifiedHelpView: true,
|
|
38435
38455
|
category: ts.Diagnostics.Output_Formatting,
|
|
38436
38456
|
description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
|
|
38437
|
-
defaultValueDescription:
|
|
38457
|
+
defaultValueDescription: true,
|
|
38438
38458
|
},
|
|
38439
38459
|
{
|
|
38440
38460
|
name: "traceResolution",
|
|
38441
38461
|
type: "boolean",
|
|
38442
38462
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38443
38463
|
description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
|
|
38444
|
-
defaultValueDescription:
|
|
38464
|
+
defaultValueDescription: false,
|
|
38445
38465
|
},
|
|
38446
38466
|
{
|
|
38447
38467
|
name: "diagnostics",
|
|
38448
38468
|
type: "boolean",
|
|
38449
38469
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38450
38470
|
description: ts.Diagnostics.Output_compiler_performance_information_after_building,
|
|
38451
|
-
defaultValueDescription:
|
|
38471
|
+
defaultValueDescription: false,
|
|
38452
38472
|
},
|
|
38453
38473
|
{
|
|
38454
38474
|
name: "extendedDiagnostics",
|
|
38455
38475
|
type: "boolean",
|
|
38456
38476
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38457
38477
|
description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
|
|
38458
|
-
defaultValueDescription:
|
|
38478
|
+
defaultValueDescription: false,
|
|
38459
38479
|
},
|
|
38460
38480
|
{
|
|
38461
38481
|
name: "generateCpuProfile",
|
|
@@ -38491,7 +38511,7 @@ var ts;
|
|
|
38491
38511
|
affectsEmit: true,
|
|
38492
38512
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38493
38513
|
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,
|
|
38494
|
-
defaultValueDescription:
|
|
38514
|
+
defaultValueDescription: false,
|
|
38495
38515
|
},
|
|
38496
38516
|
{
|
|
38497
38517
|
name: "locale",
|
|
@@ -38527,7 +38547,7 @@ var ts;
|
|
|
38527
38547
|
showInSimplifiedHelpView: true,
|
|
38528
38548
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38529
38549
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38530
|
-
defaultValueDescription:
|
|
38550
|
+
defaultValueDescription: 0 /* ES3 */,
|
|
38531
38551
|
};
|
|
38532
38552
|
var commandOptionsWithoutBuild = [
|
|
38533
38553
|
// CommandLine only options
|
|
@@ -38537,7 +38557,7 @@ var ts;
|
|
|
38537
38557
|
showInSimplifiedHelpView: true,
|
|
38538
38558
|
category: ts.Diagnostics.Command_line_Options,
|
|
38539
38559
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38540
|
-
defaultValueDescription:
|
|
38560
|
+
defaultValueDescription: false,
|
|
38541
38561
|
},
|
|
38542
38562
|
{
|
|
38543
38563
|
name: "version",
|
|
@@ -38546,7 +38566,7 @@ var ts;
|
|
|
38546
38566
|
showInSimplifiedHelpView: true,
|
|
38547
38567
|
category: ts.Diagnostics.Command_line_Options,
|
|
38548
38568
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38549
|
-
defaultValueDescription:
|
|
38569
|
+
defaultValueDescription: false,
|
|
38550
38570
|
},
|
|
38551
38571
|
{
|
|
38552
38572
|
name: "init",
|
|
@@ -38554,7 +38574,7 @@ var ts;
|
|
|
38554
38574
|
showInSimplifiedHelpView: true,
|
|
38555
38575
|
category: ts.Diagnostics.Command_line_Options,
|
|
38556
38576
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38557
|
-
defaultValueDescription:
|
|
38577
|
+
defaultValueDescription: false,
|
|
38558
38578
|
},
|
|
38559
38579
|
{
|
|
38560
38580
|
name: "project",
|
|
@@ -38573,7 +38593,7 @@ var ts;
|
|
|
38573
38593
|
showInSimplifiedHelpView: true,
|
|
38574
38594
|
category: ts.Diagnostics.Command_line_Options,
|
|
38575
38595
|
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38576
|
-
defaultValueDescription:
|
|
38596
|
+
defaultValueDescription: false,
|
|
38577
38597
|
},
|
|
38578
38598
|
{
|
|
38579
38599
|
name: "showConfig",
|
|
@@ -38582,7 +38602,7 @@ var ts;
|
|
|
38582
38602
|
category: ts.Diagnostics.Command_line_Options,
|
|
38583
38603
|
isCommandLineOnly: true,
|
|
38584
38604
|
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38585
|
-
defaultValueDescription:
|
|
38605
|
+
defaultValueDescription: false,
|
|
38586
38606
|
},
|
|
38587
38607
|
{
|
|
38588
38608
|
name: "listFilesOnly",
|
|
@@ -38592,7 +38612,7 @@ var ts;
|
|
|
38592
38612
|
affectsEmit: true,
|
|
38593
38613
|
isCommandLineOnly: true,
|
|
38594
38614
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38595
|
-
defaultValueDescription:
|
|
38615
|
+
defaultValueDescription: false,
|
|
38596
38616
|
},
|
|
38597
38617
|
// Basic
|
|
38598
38618
|
ts.targetOptionDeclaration,
|
|
@@ -38619,13 +38639,15 @@ var ts;
|
|
|
38619
38639
|
showInSimplifiedHelpView: true,
|
|
38620
38640
|
category: ts.Diagnostics.Modules,
|
|
38621
38641
|
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
38642
|
+
defaultValueDescription: undefined,
|
|
38622
38643
|
},
|
|
38623
38644
|
{
|
|
38624
38645
|
name: "lib",
|
|
38625
38646
|
type: "list",
|
|
38626
38647
|
element: {
|
|
38627
38648
|
name: "lib",
|
|
38628
|
-
type: ts.libMap
|
|
38649
|
+
type: ts.libMap,
|
|
38650
|
+
defaultValueDescription: undefined,
|
|
38629
38651
|
},
|
|
38630
38652
|
affectsProgramStructure: true,
|
|
38631
38653
|
showInSimplifiedHelpView: true,
|
|
@@ -38640,7 +38662,7 @@ var ts;
|
|
|
38640
38662
|
showInSimplifiedHelpView: true,
|
|
38641
38663
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38642
38664
|
description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
38643
|
-
defaultValueDescription:
|
|
38665
|
+
defaultValueDescription: false,
|
|
38644
38666
|
},
|
|
38645
38667
|
{
|
|
38646
38668
|
name: "checkJs",
|
|
@@ -38648,7 +38670,7 @@ var ts;
|
|
|
38648
38670
|
showInSimplifiedHelpView: true,
|
|
38649
38671
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38650
38672
|
description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
38651
|
-
defaultValueDescription:
|
|
38673
|
+
defaultValueDescription: false,
|
|
38652
38674
|
},
|
|
38653
38675
|
{
|
|
38654
38676
|
name: "jsx",
|
|
@@ -38660,7 +38682,7 @@ var ts;
|
|
|
38660
38682
|
showInSimplifiedHelpView: true,
|
|
38661
38683
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38662
38684
|
description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
|
|
38663
|
-
defaultValueDescription:
|
|
38685
|
+
defaultValueDescription: undefined,
|
|
38664
38686
|
},
|
|
38665
38687
|
{
|
|
38666
38688
|
name: "declaration",
|
|
@@ -38680,7 +38702,7 @@ var ts;
|
|
|
38680
38702
|
showInSimplifiedHelpView: true,
|
|
38681
38703
|
category: ts.Diagnostics.Emit,
|
|
38682
38704
|
transpileOptionValue: undefined,
|
|
38683
|
-
defaultValueDescription:
|
|
38705
|
+
defaultValueDescription: false,
|
|
38684
38706
|
description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
38685
38707
|
},
|
|
38686
38708
|
{
|
|
@@ -38691,7 +38713,7 @@ var ts;
|
|
|
38691
38713
|
category: ts.Diagnostics.Emit,
|
|
38692
38714
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
38693
38715
|
transpileOptionValue: undefined,
|
|
38694
|
-
defaultValueDescription:
|
|
38716
|
+
defaultValueDescription: false,
|
|
38695
38717
|
},
|
|
38696
38718
|
{
|
|
38697
38719
|
name: "sourceMap",
|
|
@@ -38699,7 +38721,7 @@ var ts;
|
|
|
38699
38721
|
affectsEmit: true,
|
|
38700
38722
|
showInSimplifiedHelpView: true,
|
|
38701
38723
|
category: ts.Diagnostics.Emit,
|
|
38702
|
-
defaultValueDescription:
|
|
38724
|
+
defaultValueDescription: false,
|
|
38703
38725
|
description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
|
|
38704
38726
|
},
|
|
38705
38727
|
{
|
|
@@ -38740,7 +38762,7 @@ var ts;
|
|
|
38740
38762
|
isTSConfigOnly: true,
|
|
38741
38763
|
category: ts.Diagnostics.Projects,
|
|
38742
38764
|
transpileOptionValue: undefined,
|
|
38743
|
-
defaultValueDescription:
|
|
38765
|
+
defaultValueDescription: false,
|
|
38744
38766
|
description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
|
|
38745
38767
|
},
|
|
38746
38768
|
{
|
|
@@ -38760,7 +38782,7 @@ var ts;
|
|
|
38760
38782
|
affectsEmit: true,
|
|
38761
38783
|
showInSimplifiedHelpView: true,
|
|
38762
38784
|
category: ts.Diagnostics.Emit,
|
|
38763
|
-
defaultValueDescription:
|
|
38785
|
+
defaultValueDescription: false,
|
|
38764
38786
|
description: ts.Diagnostics.Disable_emitting_comments,
|
|
38765
38787
|
},
|
|
38766
38788
|
{
|
|
@@ -38770,7 +38792,7 @@ var ts;
|
|
|
38770
38792
|
category: ts.Diagnostics.Emit,
|
|
38771
38793
|
description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
|
|
38772
38794
|
transpileOptionValue: undefined,
|
|
38773
|
-
defaultValueDescription:
|
|
38795
|
+
defaultValueDescription: false,
|
|
38774
38796
|
},
|
|
38775
38797
|
{
|
|
38776
38798
|
name: "importHelpers",
|
|
@@ -38778,7 +38800,7 @@ var ts;
|
|
|
38778
38800
|
affectsEmit: true,
|
|
38779
38801
|
category: ts.Diagnostics.Emit,
|
|
38780
38802
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
38781
|
-
defaultValueDescription:
|
|
38803
|
+
defaultValueDescription: false,
|
|
38782
38804
|
},
|
|
38783
38805
|
{
|
|
38784
38806
|
name: "importsNotUsedAsValues",
|
|
@@ -38790,7 +38812,8 @@ var ts;
|
|
|
38790
38812
|
affectsEmit: true,
|
|
38791
38813
|
affectsSemanticDiagnostics: true,
|
|
38792
38814
|
category: ts.Diagnostics.Emit,
|
|
38793
|
-
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
|
|
38815
|
+
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
38816
|
+
defaultValueDescription: 0 /* Remove */,
|
|
38794
38817
|
},
|
|
38795
38818
|
{
|
|
38796
38819
|
name: "downlevelIteration",
|
|
@@ -38798,7 +38821,7 @@ var ts;
|
|
|
38798
38821
|
affectsEmit: true,
|
|
38799
38822
|
category: ts.Diagnostics.Emit,
|
|
38800
38823
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
38801
|
-
defaultValueDescription:
|
|
38824
|
+
defaultValueDescription: false,
|
|
38802
38825
|
},
|
|
38803
38826
|
{
|
|
38804
38827
|
name: "isolatedModules",
|
|
@@ -38806,7 +38829,7 @@ var ts;
|
|
|
38806
38829
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38807
38830
|
description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
|
|
38808
38831
|
transpileOptionValue: true,
|
|
38809
|
-
defaultValueDescription:
|
|
38832
|
+
defaultValueDescription: false,
|
|
38810
38833
|
},
|
|
38811
38834
|
// Strict Type Checks
|
|
38812
38835
|
{
|
|
@@ -38817,7 +38840,7 @@ var ts;
|
|
|
38817
38840
|
showInSimplifiedHelpView: true,
|
|
38818
38841
|
category: ts.Diagnostics.Type_Checking,
|
|
38819
38842
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
38820
|
-
defaultValueDescription:
|
|
38843
|
+
defaultValueDescription: false,
|
|
38821
38844
|
},
|
|
38822
38845
|
{
|
|
38823
38846
|
name: "noImplicitAny",
|
|
@@ -38878,7 +38901,7 @@ var ts;
|
|
|
38878
38901
|
strictFlag: true,
|
|
38879
38902
|
category: ts.Diagnostics.Type_Checking,
|
|
38880
38903
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38881
|
-
defaultValueDescription:
|
|
38904
|
+
defaultValueDescription: false,
|
|
38882
38905
|
},
|
|
38883
38906
|
{
|
|
38884
38907
|
name: "alwaysStrict",
|
|
@@ -38896,7 +38919,7 @@ var ts;
|
|
|
38896
38919
|
affectsSemanticDiagnostics: true,
|
|
38897
38920
|
category: ts.Diagnostics.Type_Checking,
|
|
38898
38921
|
description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
|
|
38899
|
-
defaultValueDescription:
|
|
38922
|
+
defaultValueDescription: false,
|
|
38900
38923
|
},
|
|
38901
38924
|
{
|
|
38902
38925
|
name: "noUnusedParameters",
|
|
@@ -38904,7 +38927,7 @@ var ts;
|
|
|
38904
38927
|
affectsSemanticDiagnostics: true,
|
|
38905
38928
|
category: ts.Diagnostics.Type_Checking,
|
|
38906
38929
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
38907
|
-
defaultValueDescription:
|
|
38930
|
+
defaultValueDescription: false,
|
|
38908
38931
|
},
|
|
38909
38932
|
{
|
|
38910
38933
|
name: "exactOptionalPropertyTypes",
|
|
@@ -38912,7 +38935,7 @@ var ts;
|
|
|
38912
38935
|
affectsSemanticDiagnostics: true,
|
|
38913
38936
|
category: ts.Diagnostics.Type_Checking,
|
|
38914
38937
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38915
|
-
defaultValueDescription:
|
|
38938
|
+
defaultValueDescription: false,
|
|
38916
38939
|
},
|
|
38917
38940
|
{
|
|
38918
38941
|
name: "noImplicitReturns",
|
|
@@ -38920,7 +38943,7 @@ var ts;
|
|
|
38920
38943
|
affectsSemanticDiagnostics: true,
|
|
38921
38944
|
category: ts.Diagnostics.Type_Checking,
|
|
38922
38945
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
38923
|
-
defaultValueDescription:
|
|
38946
|
+
defaultValueDescription: false,
|
|
38924
38947
|
},
|
|
38925
38948
|
{
|
|
38926
38949
|
name: "noFallthroughCasesInSwitch",
|
|
@@ -38929,7 +38952,7 @@ var ts;
|
|
|
38929
38952
|
affectsSemanticDiagnostics: true,
|
|
38930
38953
|
category: ts.Diagnostics.Type_Checking,
|
|
38931
38954
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38932
|
-
defaultValueDescription:
|
|
38955
|
+
defaultValueDescription: false,
|
|
38933
38956
|
},
|
|
38934
38957
|
{
|
|
38935
38958
|
name: "noUncheckedIndexedAccess",
|
|
@@ -38937,7 +38960,7 @@ var ts;
|
|
|
38937
38960
|
affectsSemanticDiagnostics: true,
|
|
38938
38961
|
category: ts.Diagnostics.Type_Checking,
|
|
38939
38962
|
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38940
|
-
defaultValueDescription:
|
|
38963
|
+
defaultValueDescription: false,
|
|
38941
38964
|
},
|
|
38942
38965
|
{
|
|
38943
38966
|
name: "noImplicitOverride",
|
|
@@ -38945,7 +38968,7 @@ var ts;
|
|
|
38945
38968
|
affectsSemanticDiagnostics: true,
|
|
38946
38969
|
category: ts.Diagnostics.Type_Checking,
|
|
38947
38970
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38948
|
-
defaultValueDescription:
|
|
38971
|
+
defaultValueDescription: false,
|
|
38949
38972
|
},
|
|
38950
38973
|
{
|
|
38951
38974
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38953,7 +38976,7 @@ var ts;
|
|
|
38953
38976
|
showInSimplifiedHelpView: false,
|
|
38954
38977
|
category: ts.Diagnostics.Type_Checking,
|
|
38955
38978
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
38956
|
-
defaultValueDescription:
|
|
38979
|
+
defaultValueDescription: false,
|
|
38957
38980
|
},
|
|
38958
38981
|
// Module Resolution
|
|
38959
38982
|
{
|
|
@@ -39047,14 +39070,14 @@ var ts;
|
|
|
39047
39070
|
showInSimplifiedHelpView: true,
|
|
39048
39071
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39049
39072
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
39050
|
-
defaultValueDescription:
|
|
39073
|
+
defaultValueDescription: false,
|
|
39051
39074
|
},
|
|
39052
39075
|
{
|
|
39053
39076
|
name: "preserveSymlinks",
|
|
39054
39077
|
type: "boolean",
|
|
39055
39078
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39056
39079
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
39057
|
-
defaultValueDescription:
|
|
39080
|
+
defaultValueDescription: false,
|
|
39058
39081
|
},
|
|
39059
39082
|
{
|
|
39060
39083
|
name: "allowUmdGlobalAccess",
|
|
@@ -39062,7 +39085,7 @@ var ts;
|
|
|
39062
39085
|
affectsSemanticDiagnostics: true,
|
|
39063
39086
|
category: ts.Diagnostics.Modules,
|
|
39064
39087
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
39065
|
-
defaultValueDescription:
|
|
39088
|
+
defaultValueDescription: false,
|
|
39066
39089
|
},
|
|
39067
39090
|
// Source Maps
|
|
39068
39091
|
{
|
|
@@ -39087,7 +39110,7 @@ var ts;
|
|
|
39087
39110
|
affectsEmit: true,
|
|
39088
39111
|
category: ts.Diagnostics.Emit,
|
|
39089
39112
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
39090
|
-
defaultValueDescription:
|
|
39113
|
+
defaultValueDescription: false,
|
|
39091
39114
|
},
|
|
39092
39115
|
{
|
|
39093
39116
|
name: "inlineSources",
|
|
@@ -39095,7 +39118,7 @@ var ts;
|
|
|
39095
39118
|
affectsEmit: true,
|
|
39096
39119
|
category: ts.Diagnostics.Emit,
|
|
39097
39120
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
39098
|
-
defaultValueDescription:
|
|
39121
|
+
defaultValueDescription: false,
|
|
39099
39122
|
},
|
|
39100
39123
|
// Experimental
|
|
39101
39124
|
{
|
|
@@ -39104,7 +39127,7 @@ var ts;
|
|
|
39104
39127
|
affectsSemanticDiagnostics: true,
|
|
39105
39128
|
category: ts.Diagnostics.Language_and_Environment,
|
|
39106
39129
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
39107
|
-
defaultValueDescription:
|
|
39130
|
+
defaultValueDescription: false,
|
|
39108
39131
|
},
|
|
39109
39132
|
{
|
|
39110
39133
|
name: "emitDecoratorMetadata",
|
|
@@ -39113,7 +39136,7 @@ var ts;
|
|
|
39113
39136
|
affectsEmit: true,
|
|
39114
39137
|
category: ts.Diagnostics.Language_and_Environment,
|
|
39115
39138
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
39116
|
-
defaultValueDescription:
|
|
39139
|
+
defaultValueDescription: false,
|
|
39117
39140
|
},
|
|
39118
39141
|
// Advanced
|
|
39119
39142
|
{
|
|
@@ -39145,7 +39168,7 @@ var ts;
|
|
|
39145
39168
|
affectsModuleResolution: true,
|
|
39146
39169
|
category: ts.Diagnostics.Modules,
|
|
39147
39170
|
description: ts.Diagnostics.Enable_importing_json_files,
|
|
39148
|
-
defaultValueDescription:
|
|
39171
|
+
defaultValueDescription: false,
|
|
39149
39172
|
},
|
|
39150
39173
|
{
|
|
39151
39174
|
name: "out",
|
|
@@ -39171,7 +39194,7 @@ var ts;
|
|
|
39171
39194
|
type: "boolean",
|
|
39172
39195
|
category: ts.Diagnostics.Completeness,
|
|
39173
39196
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
39174
|
-
defaultValueDescription:
|
|
39197
|
+
defaultValueDescription: false,
|
|
39175
39198
|
},
|
|
39176
39199
|
{
|
|
39177
39200
|
name: "charset",
|
|
@@ -39186,7 +39209,7 @@ var ts;
|
|
|
39186
39209
|
affectsEmit: true,
|
|
39187
39210
|
category: ts.Diagnostics.Emit,
|
|
39188
39211
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
39189
|
-
defaultValueDescription:
|
|
39212
|
+
defaultValueDescription: false,
|
|
39190
39213
|
},
|
|
39191
39214
|
{
|
|
39192
39215
|
name: "newLine",
|
|
@@ -39206,7 +39229,7 @@ var ts;
|
|
|
39206
39229
|
affectsSemanticDiagnostics: true,
|
|
39207
39230
|
category: ts.Diagnostics.Output_Formatting,
|
|
39208
39231
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
39209
|
-
defaultValueDescription:
|
|
39232
|
+
defaultValueDescription: false,
|
|
39210
39233
|
},
|
|
39211
39234
|
{
|
|
39212
39235
|
name: "noLib",
|
|
@@ -39217,7 +39240,7 @@ var ts;
|
|
|
39217
39240
|
// We are not returning a sourceFile for lib file when asked by the program,
|
|
39218
39241
|
// so pass --noLib to avoid reporting a file not found error.
|
|
39219
39242
|
transpileOptionValue: true,
|
|
39220
|
-
defaultValueDescription:
|
|
39243
|
+
defaultValueDescription: false,
|
|
39221
39244
|
},
|
|
39222
39245
|
{
|
|
39223
39246
|
name: "noResolve",
|
|
@@ -39228,7 +39251,7 @@ var ts;
|
|
|
39228
39251
|
// We are not doing a full typecheck, we are not resolving the whole context,
|
|
39229
39252
|
// so pass --noResolve to avoid reporting missing file errors.
|
|
39230
39253
|
transpileOptionValue: true,
|
|
39231
|
-
defaultValueDescription:
|
|
39254
|
+
defaultValueDescription: false,
|
|
39232
39255
|
},
|
|
39233
39256
|
{
|
|
39234
39257
|
name: "stripInternal",
|
|
@@ -39236,7 +39259,7 @@ var ts;
|
|
|
39236
39259
|
affectsEmit: true,
|
|
39237
39260
|
category: ts.Diagnostics.Emit,
|
|
39238
39261
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
39239
|
-
defaultValueDescription:
|
|
39262
|
+
defaultValueDescription: false,
|
|
39240
39263
|
},
|
|
39241
39264
|
{
|
|
39242
39265
|
name: "disableSizeLimit",
|
|
@@ -39244,7 +39267,7 @@ var ts;
|
|
|
39244
39267
|
affectsProgramStructure: true,
|
|
39245
39268
|
category: ts.Diagnostics.Editor_Support,
|
|
39246
39269
|
description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
|
|
39247
|
-
defaultValueDescription:
|
|
39270
|
+
defaultValueDescription: false,
|
|
39248
39271
|
},
|
|
39249
39272
|
{
|
|
39250
39273
|
name: "disableSourceOfProjectReferenceRedirect",
|
|
@@ -39252,7 +39275,7 @@ var ts;
|
|
|
39252
39275
|
isTSConfigOnly: true,
|
|
39253
39276
|
category: ts.Diagnostics.Projects,
|
|
39254
39277
|
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39255
|
-
defaultValueDescription:
|
|
39278
|
+
defaultValueDescription: false,
|
|
39256
39279
|
},
|
|
39257
39280
|
{
|
|
39258
39281
|
name: "disableSolutionSearching",
|
|
@@ -39260,7 +39283,7 @@ var ts;
|
|
|
39260
39283
|
isTSConfigOnly: true,
|
|
39261
39284
|
category: ts.Diagnostics.Projects,
|
|
39262
39285
|
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39263
|
-
defaultValueDescription:
|
|
39286
|
+
defaultValueDescription: false,
|
|
39264
39287
|
},
|
|
39265
39288
|
{
|
|
39266
39289
|
name: "disableReferencedProjectLoad",
|
|
@@ -39268,7 +39291,7 @@ var ts;
|
|
|
39268
39291
|
isTSConfigOnly: true,
|
|
39269
39292
|
category: ts.Diagnostics.Projects,
|
|
39270
39293
|
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39271
|
-
defaultValueDescription:
|
|
39294
|
+
defaultValueDescription: false,
|
|
39272
39295
|
},
|
|
39273
39296
|
{
|
|
39274
39297
|
name: "noImplicitUseStrict",
|
|
@@ -39276,7 +39299,7 @@ var ts;
|
|
|
39276
39299
|
affectsSemanticDiagnostics: true,
|
|
39277
39300
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39278
39301
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
39279
|
-
defaultValueDescription:
|
|
39302
|
+
defaultValueDescription: false,
|
|
39280
39303
|
},
|
|
39281
39304
|
{
|
|
39282
39305
|
name: "noEmitHelpers",
|
|
@@ -39284,7 +39307,7 @@ var ts;
|
|
|
39284
39307
|
affectsEmit: true,
|
|
39285
39308
|
category: ts.Diagnostics.Emit,
|
|
39286
39309
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
39287
|
-
defaultValueDescription:
|
|
39310
|
+
defaultValueDescription: false,
|
|
39288
39311
|
},
|
|
39289
39312
|
{
|
|
39290
39313
|
name: "noEmitOnError",
|
|
@@ -39293,7 +39316,7 @@ var ts;
|
|
|
39293
39316
|
category: ts.Diagnostics.Emit,
|
|
39294
39317
|
transpileOptionValue: undefined,
|
|
39295
39318
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
39296
|
-
defaultValueDescription:
|
|
39319
|
+
defaultValueDescription: false,
|
|
39297
39320
|
},
|
|
39298
39321
|
{
|
|
39299
39322
|
name: "preserveConstEnums",
|
|
@@ -39301,7 +39324,7 @@ var ts;
|
|
|
39301
39324
|
affectsEmit: true,
|
|
39302
39325
|
category: ts.Diagnostics.Emit,
|
|
39303
39326
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39304
|
-
defaultValueDescription:
|
|
39327
|
+
defaultValueDescription: false,
|
|
39305
39328
|
},
|
|
39306
39329
|
{
|
|
39307
39330
|
name: "declarationDir",
|
|
@@ -39318,7 +39341,7 @@ var ts;
|
|
|
39318
39341
|
type: "boolean",
|
|
39319
39342
|
category: ts.Diagnostics.Completeness,
|
|
39320
39343
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
39321
|
-
defaultValueDescription:
|
|
39344
|
+
defaultValueDescription: false,
|
|
39322
39345
|
},
|
|
39323
39346
|
{
|
|
39324
39347
|
name: "allowUnusedLabels",
|
|
@@ -39327,7 +39350,7 @@ var ts;
|
|
|
39327
39350
|
affectsSemanticDiagnostics: true,
|
|
39328
39351
|
category: ts.Diagnostics.Type_Checking,
|
|
39329
39352
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
39330
|
-
defaultValueDescription:
|
|
39353
|
+
defaultValueDescription: undefined,
|
|
39331
39354
|
},
|
|
39332
39355
|
{
|
|
39333
39356
|
name: "allowUnreachableCode",
|
|
@@ -39336,7 +39359,7 @@ var ts;
|
|
|
39336
39359
|
affectsSemanticDiagnostics: true,
|
|
39337
39360
|
category: ts.Diagnostics.Type_Checking,
|
|
39338
39361
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
39339
|
-
defaultValueDescription:
|
|
39362
|
+
defaultValueDescription: undefined,
|
|
39340
39363
|
},
|
|
39341
39364
|
{
|
|
39342
39365
|
name: "suppressExcessPropertyErrors",
|
|
@@ -39344,7 +39367,7 @@ var ts;
|
|
|
39344
39367
|
affectsSemanticDiagnostics: true,
|
|
39345
39368
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39346
39369
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
39347
|
-
defaultValueDescription:
|
|
39370
|
+
defaultValueDescription: false,
|
|
39348
39371
|
},
|
|
39349
39372
|
{
|
|
39350
39373
|
name: "suppressImplicitAnyIndexErrors",
|
|
@@ -39352,7 +39375,7 @@ var ts;
|
|
|
39352
39375
|
affectsSemanticDiagnostics: true,
|
|
39353
39376
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39354
39377
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
39355
|
-
defaultValueDescription:
|
|
39378
|
+
defaultValueDescription: false,
|
|
39356
39379
|
},
|
|
39357
39380
|
{
|
|
39358
39381
|
name: "forceConsistentCasingInFileNames",
|
|
@@ -39360,7 +39383,7 @@ var ts;
|
|
|
39360
39383
|
affectsModuleResolution: true,
|
|
39361
39384
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39362
39385
|
description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
39363
|
-
defaultValueDescription:
|
|
39386
|
+
defaultValueDescription: false,
|
|
39364
39387
|
},
|
|
39365
39388
|
{
|
|
39366
39389
|
name: "maxNodeModuleJsDepth",
|
|
@@ -39368,7 +39391,7 @@ var ts;
|
|
|
39368
39391
|
affectsModuleResolution: true,
|
|
39369
39392
|
category: ts.Diagnostics.JavaScript_Support,
|
|
39370
39393
|
description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
|
|
39371
|
-
defaultValueDescription:
|
|
39394
|
+
defaultValueDescription: 0,
|
|
39372
39395
|
},
|
|
39373
39396
|
{
|
|
39374
39397
|
name: "noStrictGenericChecks",
|
|
@@ -39376,7 +39399,7 @@ var ts;
|
|
|
39376
39399
|
affectsSemanticDiagnostics: true,
|
|
39377
39400
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39378
39401
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
39379
|
-
defaultValueDescription:
|
|
39402
|
+
defaultValueDescription: false,
|
|
39380
39403
|
},
|
|
39381
39404
|
{
|
|
39382
39405
|
name: "useDefineForClassFields",
|
|
@@ -39393,14 +39416,14 @@ var ts;
|
|
|
39393
39416
|
affectsEmit: true,
|
|
39394
39417
|
category: ts.Diagnostics.Emit,
|
|
39395
39418
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39396
|
-
defaultValueDescription:
|
|
39419
|
+
defaultValueDescription: false,
|
|
39397
39420
|
},
|
|
39398
39421
|
{
|
|
39399
39422
|
name: "keyofStringsOnly",
|
|
39400
39423
|
type: "boolean",
|
|
39401
39424
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39402
39425
|
description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
|
|
39403
|
-
defaultValueDescription:
|
|
39426
|
+
defaultValueDescription: false,
|
|
39404
39427
|
},
|
|
39405
39428
|
{
|
|
39406
39429
|
// A list of plugins to load in the language service
|
|
@@ -39442,7 +39465,7 @@ var ts;
|
|
|
39442
39465
|
category: ts.Diagnostics.Command_line_Options,
|
|
39443
39466
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39444
39467
|
type: "boolean",
|
|
39445
|
-
defaultValueDescription:
|
|
39468
|
+
defaultValueDescription: false,
|
|
39446
39469
|
},
|
|
39447
39470
|
{
|
|
39448
39471
|
name: "dry",
|
|
@@ -39450,7 +39473,7 @@ var ts;
|
|
|
39450
39473
|
category: ts.Diagnostics.Command_line_Options,
|
|
39451
39474
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39452
39475
|
type: "boolean",
|
|
39453
|
-
defaultValueDescription:
|
|
39476
|
+
defaultValueDescription: false,
|
|
39454
39477
|
},
|
|
39455
39478
|
{
|
|
39456
39479
|
name: "force",
|
|
@@ -39458,14 +39481,14 @@ var ts;
|
|
|
39458
39481
|
category: ts.Diagnostics.Command_line_Options,
|
|
39459
39482
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39460
39483
|
type: "boolean",
|
|
39461
|
-
defaultValueDescription:
|
|
39484
|
+
defaultValueDescription: false,
|
|
39462
39485
|
},
|
|
39463
39486
|
{
|
|
39464
39487
|
name: "clean",
|
|
39465
39488
|
category: ts.Diagnostics.Command_line_Options,
|
|
39466
39489
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39467
39490
|
type: "boolean",
|
|
39468
|
-
defaultValueDescription:
|
|
39491
|
+
defaultValueDescription: false,
|
|
39469
39492
|
}
|
|
39470
39493
|
];
|
|
39471
39494
|
/* @internal */
|
|
@@ -39478,12 +39501,12 @@ var ts;
|
|
|
39478
39501
|
*/
|
|
39479
39502
|
name: "enableAutoDiscovery",
|
|
39480
39503
|
type: "boolean",
|
|
39481
|
-
defaultValueDescription:
|
|
39504
|
+
defaultValueDescription: false,
|
|
39482
39505
|
},
|
|
39483
39506
|
{
|
|
39484
39507
|
name: "enable",
|
|
39485
39508
|
type: "boolean",
|
|
39486
|
-
defaultValueDescription:
|
|
39509
|
+
defaultValueDescription: false,
|
|
39487
39510
|
},
|
|
39488
39511
|
{
|
|
39489
39512
|
name: "include",
|
|
@@ -39504,7 +39527,7 @@ var ts;
|
|
|
39504
39527
|
{
|
|
39505
39528
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39506
39529
|
type: "boolean",
|
|
39507
|
-
defaultValueDescription:
|
|
39530
|
+
defaultValueDescription: false,
|
|
39508
39531
|
},
|
|
39509
39532
|
];
|
|
39510
39533
|
/*@internal*/
|
|
@@ -47023,6 +47046,7 @@ var ts;
|
|
|
47023
47046
|
getIndexInfosOfType: getIndexInfosOfType,
|
|
47024
47047
|
getSignaturesOfType: getSignaturesOfType,
|
|
47025
47048
|
getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType); },
|
|
47049
|
+
getIndexType: function (type) { return getIndexType(type); },
|
|
47026
47050
|
getBaseTypes: getBaseTypes,
|
|
47027
47051
|
getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
|
|
47028
47052
|
getWidenedType: getWidenedType,
|
|
@@ -48280,11 +48304,12 @@ var ts;
|
|
|
48280
48304
|
*
|
|
48281
48305
|
* @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
|
|
48282
48306
|
*/
|
|
48283
|
-
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
|
|
48307
|
+
function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
|
|
48284
48308
|
if (excludeGlobals === void 0) { excludeGlobals = false; }
|
|
48285
|
-
|
|
48309
|
+
if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
|
|
48310
|
+
return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
|
|
48286
48311
|
}
|
|
48287
|
-
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
|
|
48312
|
+
function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
|
|
48288
48313
|
var _a, _b, _c;
|
|
48289
48314
|
var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
|
|
48290
48315
|
var result;
|
|
@@ -48601,7 +48626,7 @@ var ts;
|
|
|
48601
48626
|
}
|
|
48602
48627
|
}
|
|
48603
48628
|
if (!result) {
|
|
48604
|
-
if (nameNotFoundMessage) {
|
|
48629
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48605
48630
|
if (!errorLocation ||
|
|
48606
48631
|
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
|
|
48607
48632
|
!checkAndReportErrorForExtendingInterface(errorLocation) &&
|
|
@@ -48611,7 +48636,7 @@ var ts;
|
|
|
48611
48636
|
!checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
|
|
48612
48637
|
!checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
|
|
48613
48638
|
var suggestion = void 0;
|
|
48614
|
-
if (suggestionCount < maximumSuggestionCount) {
|
|
48639
|
+
if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
|
|
48615
48640
|
suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
|
|
48616
48641
|
var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
|
|
48617
48642
|
if (isGlobalScopeAugmentationDeclaration) {
|
|
@@ -48647,7 +48672,7 @@ var ts;
|
|
|
48647
48672
|
return undefined;
|
|
48648
48673
|
}
|
|
48649
48674
|
// Perform extra checks only if error reporting was requested
|
|
48650
|
-
if (nameNotFoundMessage) {
|
|
48675
|
+
if (nameNotFoundMessage && produceDiagnostics) {
|
|
48651
48676
|
if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
|
|
48652
48677
|
// We have a match, but the reference occurred within a property initializer and the identifier also binds
|
|
48653
48678
|
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
|
|
@@ -51123,7 +51148,7 @@ var ts;
|
|
|
51123
51148
|
context.approximateLength += 6;
|
|
51124
51149
|
return ts.factory.createKeywordTypeNode(147 /* ObjectKeyword */);
|
|
51125
51150
|
}
|
|
51126
|
-
if (isThisTypeParameter(type)) {
|
|
51151
|
+
if (ts.isThisTypeParameter(type)) {
|
|
51127
51152
|
if (context.flags & 4194304 /* InObjectTypeLiteral */) {
|
|
51128
51153
|
if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
|
|
51129
51154
|
context.encounteredError = true;
|
|
@@ -59068,7 +59093,7 @@ var ts;
|
|
|
59068
59093
|
}
|
|
59069
59094
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
59070
59095
|
// Don't track references for global symbols anyway, so value if `isReference` is arbitrary
|
|
59071
|
-
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
|
|
59096
|
+
return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
|
|
59072
59097
|
}
|
|
59073
59098
|
function getGlobalType(name, arity, reportErrors) {
|
|
59074
59099
|
var symbol = getGlobalTypeSymbol(name, reportErrors);
|
|
@@ -60647,9 +60672,6 @@ var ts;
|
|
|
60647
60672
|
return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
|
|
60648
60673
|
(type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
|
|
60649
60674
|
}
|
|
60650
|
-
function isThisTypeParameter(type) {
|
|
60651
|
-
return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
|
|
60652
|
-
}
|
|
60653
60675
|
function getSimplifiedType(type, writing) {
|
|
60654
60676
|
return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
|
|
60655
60677
|
type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) :
|
|
@@ -65847,7 +65869,7 @@ var ts;
|
|
|
65847
65869
|
// flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns
|
|
65848
65870
|
// no flags for all other types (including non-falsy literal types).
|
|
65849
65871
|
function getFalsyFlags(type) {
|
|
65850
|
-
return type.flags &
|
|
65872
|
+
return type.flags & 3145728 /* UnionOrIntersection */ ? getFalsyFlagsOfTypes(type.types) :
|
|
65851
65873
|
type.flags & 128 /* StringLiteral */ ? type.value === "" ? 128 /* StringLiteral */ : 0 :
|
|
65852
65874
|
type.flags & 256 /* NumberLiteral */ ? type.value === 0 ? 256 /* NumberLiteral */ : 0 :
|
|
65853
65875
|
type.flags & 2048 /* BigIntLiteral */ ? isZeroBigInt(type) ? 2048 /* BigIntLiteral */ : 0 :
|
|
@@ -67463,6 +67485,11 @@ var ts;
|
|
|
67463
67485
|
case "BigInt64Array":
|
|
67464
67486
|
case "BigUint64Array":
|
|
67465
67487
|
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;
|
|
67488
|
+
case "await":
|
|
67489
|
+
if (ts.isCallExpression(node.parent)) {
|
|
67490
|
+
return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
|
|
67491
|
+
}
|
|
67492
|
+
// falls through
|
|
67466
67493
|
default:
|
|
67467
67494
|
if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
|
|
67468
67495
|
return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
|
|
@@ -69020,7 +69047,7 @@ var ts;
|
|
|
69020
69047
|
function narrowByInKeyword(type, name, assumeTrue) {
|
|
69021
69048
|
if (type.flags & 1048576 /* Union */
|
|
69022
69049
|
|| type.flags & 524288 /* Object */ && declaredType !== type
|
|
69023
|
-
|| isThisTypeParameter(type)
|
|
69050
|
+
|| ts.isThisTypeParameter(type)
|
|
69024
69051
|
|| type.flags & 2097152 /* Intersection */ && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
|
|
69025
69052
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
69026
69053
|
}
|
|
@@ -71840,15 +71867,9 @@ var ts;
|
|
|
71840
71867
|
}
|
|
71841
71868
|
}
|
|
71842
71869
|
function isValidSpreadType(type) {
|
|
71843
|
-
|
|
71844
|
-
|
|
71845
|
-
|
|
71846
|
-
return isValidSpreadType(constraint);
|
|
71847
|
-
}
|
|
71848
|
-
}
|
|
71849
|
-
return !!(type.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71850
|
-
getFalsyFlags(type) & 117632 /* DefinitelyFalsy */ && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
|
|
71851
|
-
type.flags & 3145728 /* UnionOrIntersection */ && ts.every(type.types, isValidSpreadType));
|
|
71870
|
+
var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
|
|
71871
|
+
return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
|
|
71872
|
+
t.flags & 3145728 /* UnionOrIntersection */ && ts.every(t.types, isValidSpreadType));
|
|
71852
71873
|
}
|
|
71853
71874
|
function checkJsxSelfClosingElementDeferred(node) {
|
|
71854
71875
|
checkJsxOpeningLikeElementOrOpeningFragment(node);
|
|
@@ -72799,7 +72820,7 @@ var ts;
|
|
|
72799
72820
|
}
|
|
72800
72821
|
var propType;
|
|
72801
72822
|
if (!prop) {
|
|
72802
|
-
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
|
|
72823
|
+
var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
|
|
72803
72824
|
getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
|
|
72804
72825
|
if (!(indexInfo && indexInfo.type)) {
|
|
72805
72826
|
var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, /*excludeClasses*/ true);
|
|
@@ -72816,7 +72837,7 @@ var ts;
|
|
|
72816
72837
|
return anyType;
|
|
72817
72838
|
}
|
|
72818
72839
|
if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
|
|
72819
|
-
reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72840
|
+
reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
|
|
72820
72841
|
}
|
|
72821
72842
|
return errorType;
|
|
72822
72843
|
}
|
|
@@ -73109,7 +73130,7 @@ var ts;
|
|
|
73109
73130
|
}
|
|
73110
73131
|
function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
|
|
73111
73132
|
ts.Debug.assert(outerName !== undefined, "outername should always be defined");
|
|
73112
|
-
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
|
|
73133
|
+
var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
|
|
73113
73134
|
ts.Debug.assertEqual(outerName, name, "name should equal outerName");
|
|
73114
73135
|
var symbol = getSymbol(symbols, name, meaning);
|
|
73115
73136
|
// 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
|
|
@@ -73355,7 +73376,7 @@ var ts;
|
|
|
73355
73376
|
}
|
|
73356
73377
|
var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
|
|
73357
73378
|
var accessFlags = ts.isAssignmentTarget(node) ?
|
|
73358
|
-
4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73379
|
+
4 /* Writing */ | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
|
|
73359
73380
|
32 /* ExpressionPosition */;
|
|
73360
73381
|
var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
|
|
73361
73382
|
return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
|
|
@@ -86817,18 +86838,22 @@ var ts;
|
|
|
86817
86838
|
return false;
|
|
86818
86839
|
}
|
|
86819
86840
|
function checkNumericLiteralValueSize(node) {
|
|
86841
|
+
// We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
|
|
86842
|
+
// e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
|
|
86843
|
+
var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
|
|
86844
|
+
var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
86820
86845
|
// Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
|
|
86821
|
-
// Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
|
|
86822
86846
|
// Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
|
|
86823
|
-
if (
|
|
86847
|
+
if (isFractional || isScientific) {
|
|
86824
86848
|
return;
|
|
86825
86849
|
}
|
|
86826
|
-
//
|
|
86827
|
-
//
|
|
86828
|
-
//
|
|
86829
|
-
//
|
|
86830
|
-
|
|
86831
|
-
|
|
86850
|
+
// Here `node` is guaranteed to be a numeric literal representing an integer.
|
|
86851
|
+
// We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
|
|
86852
|
+
// 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
|
|
86853
|
+
// 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
|
|
86854
|
+
// thus the result of the predicate won't be affected.
|
|
86855
|
+
var value = +node.text;
|
|
86856
|
+
if (value <= Math.pow(2, 53) - 1) {
|
|
86832
86857
|
return;
|
|
86833
86858
|
}
|
|
86834
86859
|
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));
|
|
@@ -90290,7 +90315,7 @@ var ts;
|
|
|
90290
90315
|
// ], C.prototype, "prop");
|
|
90291
90316
|
//
|
|
90292
90317
|
var prefix = getClassMemberPrefix(node, member);
|
|
90293
|
-
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/
|
|
90318
|
+
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
|
|
90294
90319
|
var descriptor = languageVersion > 0 /* ES3 */
|
|
90295
90320
|
? member.kind === 166 /* PropertyDeclaration */
|
|
90296
90321
|
// We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it
|
|
@@ -128182,7 +128207,7 @@ var ts;
|
|
|
128182
128207
|
case 0 /* Paths */:
|
|
128183
128208
|
return convertPathCompletions(completion.paths);
|
|
128184
128209
|
case 1 /* Properties */: {
|
|
128185
|
-
var entries =
|
|
128210
|
+
var entries = ts.createSortedArray();
|
|
128186
128211
|
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
|
|
128187
128212
|
return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan: optionalReplacementSpan, entries: entries };
|
|
128188
128213
|
}
|
|
@@ -128380,7 +128405,7 @@ var ts;
|
|
|
128380
128405
|
var types = ts.flatMap(candidates, function (candidate) {
|
|
128381
128406
|
if (!ts.signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length)
|
|
128382
128407
|
return;
|
|
128383
|
-
var type =
|
|
128408
|
+
var type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex);
|
|
128384
128409
|
isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */);
|
|
128385
128410
|
return getStringLiteralTypes(type, uniques);
|
|
128386
128411
|
});
|
|
@@ -129064,6 +129089,29 @@ var ts;
|
|
|
129064
129089
|
}
|
|
129065
129090
|
}
|
|
129066
129091
|
Completions.getCompletionsAtPosition = getCompletionsAtPosition;
|
|
129092
|
+
// Editors will use the `sortText` and then fall back to `name` for sorting, but leave ties in response order.
|
|
129093
|
+
// So, it's important that we sort those ties in the order we want them displayed if it matters. We don't
|
|
129094
|
+
// strictly need to sort by name or SortText here since clients are going to do it anyway, but we have to
|
|
129095
|
+
// do the work of comparing them so we can sort those ties appropriately; plus, it makes the order returned
|
|
129096
|
+
// by the language service consistent with what TS Server does and what editors typically do. This also makes
|
|
129097
|
+
// completions tests make more sense. We used to sort only alphabetically and only in the server layer, but
|
|
129098
|
+
// this made tests really weird, since most fourslash tests don't use the server.
|
|
129099
|
+
function compareCompletionEntries(entryInArray, entryToInsert) {
|
|
129100
|
+
var _a, _b;
|
|
129101
|
+
var result = ts.compareStringsCaseSensitiveUI(entryInArray.sortText, entryToInsert.sortText);
|
|
129102
|
+
if (result === 0 /* EqualTo */) {
|
|
129103
|
+
result = ts.compareStringsCaseSensitiveUI(entryInArray.name, entryToInsert.name);
|
|
129104
|
+
}
|
|
129105
|
+
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)) {
|
|
129106
|
+
// Sort same-named auto-imports by module specifier
|
|
129107
|
+
result = ts.compareNumberOfDirectorySeparators(entryInArray.data.moduleSpecifier, entryToInsert.data.moduleSpecifier);
|
|
129108
|
+
}
|
|
129109
|
+
if (result === 0 /* EqualTo */) {
|
|
129110
|
+
// Fall back to symbol order - if we return `EqualTo`, `insertSorted` will put later symbols first.
|
|
129111
|
+
return -1 /* LessThan */;
|
|
129112
|
+
}
|
|
129113
|
+
return result;
|
|
129114
|
+
}
|
|
129067
129115
|
function completionEntryDataIsResolved(data) {
|
|
129068
129116
|
return !!(data === null || data === void 0 ? void 0 : data.moduleSpecifier);
|
|
129069
129117
|
}
|
|
@@ -129150,7 +129198,7 @@ var ts;
|
|
|
129150
129198
|
return completionInfo;
|
|
129151
129199
|
}
|
|
129152
129200
|
}
|
|
129153
|
-
var entries =
|
|
129201
|
+
var entries = ts.createSortedArray();
|
|
129154
129202
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
129155
129203
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
129156
129204
|
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
@@ -129168,13 +129216,13 @@ var ts;
|
|
|
129168
129216
|
for (var _i = 0, _a = getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && ts.isSourceFileJS(sourceFile)); _i < _a.length; _i++) {
|
|
129169
129217
|
var keywordEntry = _a[_i];
|
|
129170
129218
|
if (!entryNames.has(keywordEntry.name)) {
|
|
129171
|
-
|
|
129219
|
+
ts.insertSorted(entries, keywordEntry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
129172
129220
|
}
|
|
129173
129221
|
}
|
|
129174
129222
|
}
|
|
129175
129223
|
for (var _b = 0, literals_1 = literals; _b < literals_1.length; _b++) {
|
|
129176
129224
|
var literal = literals_1[_b];
|
|
129177
|
-
|
|
129225
|
+
ts.insertSorted(entries, createCompletionEntryForLiteral(sourceFile, preferences, literal), compareCompletionEntries, /*allowDuplicates*/ true);
|
|
129178
129226
|
}
|
|
129179
129227
|
return {
|
|
129180
129228
|
isGlobalCompletion: isInSnippetScope,
|
|
@@ -129250,13 +129298,13 @@ var ts;
|
|
|
129250
129298
|
var realName = ts.unescapeLeadingUnderscores(name);
|
|
129251
129299
|
if (!uniqueNames.has(realName) && ts.isIdentifierText(realName, target)) {
|
|
129252
129300
|
uniqueNames.add(realName);
|
|
129253
|
-
|
|
129301
|
+
ts.insertSorted(entries, {
|
|
129254
129302
|
name: realName,
|
|
129255
129303
|
kind: "warning" /* warning */,
|
|
129256
129304
|
kindModifiers: "",
|
|
129257
129305
|
sortText: SortText.JavascriptIdentifiers,
|
|
129258
129306
|
isFromUncheckedFile: true
|
|
129259
|
-
});
|
|
129307
|
+
}, compareCompletionEntries);
|
|
129260
129308
|
}
|
|
129261
129309
|
});
|
|
129262
129310
|
}
|
|
@@ -129680,7 +129728,7 @@ var ts;
|
|
|
129680
129728
|
/** True for locals; false for globals, module exports from other files, `this.` completions. */
|
|
129681
129729
|
var shouldShadowLaterSymbols = !origin && !(symbol.parent === undefined && !ts.some(symbol.declarations, function (d) { return d.getSourceFile() === location.getSourceFile(); }));
|
|
129682
129730
|
uniques.set(name, shouldShadowLaterSymbols);
|
|
129683
|
-
|
|
129731
|
+
ts.insertSorted(entries, entry, compareCompletionEntries, /*allowDuplicates*/ true);
|
|
129684
129732
|
}
|
|
129685
129733
|
log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ts.timestamp() - start));
|
|
129686
129734
|
// Prevent consumers of this map from having to worry about
|
|
@@ -152157,6 +152205,7 @@ var ts;
|
|
|
152157
152205
|
var errorCodes = [
|
|
152158
152206
|
ts.Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
152159
152207
|
ts.Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
|
|
152208
|
+
ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code
|
|
152160
152209
|
];
|
|
152161
152210
|
codefix.registerCodeFix({
|
|
152162
152211
|
errorCodes: errorCodes,
|
|
@@ -159967,6 +160016,9 @@ var ts;
|
|
|
159967
160016
|
TypeObject.prototype.isClass = function () {
|
|
159968
160017
|
return !!(ts.getObjectFlags(this) & 1 /* Class */);
|
|
159969
160018
|
};
|
|
160019
|
+
TypeObject.prototype.isIndexType = function () {
|
|
160020
|
+
return !!(this.flags & 4194304 /* Index */);
|
|
160021
|
+
};
|
|
159970
160022
|
Object.defineProperty(TypeObject.prototype, "typeArguments", {
|
|
159971
160023
|
/**
|
|
159972
160024
|
* This polyfills `referenceType.typeArguments` for API consumers
|
|
@@ -159999,6 +160051,16 @@ var ts;
|
|
|
159999
160051
|
SignatureObject.prototype.getReturnType = function () {
|
|
160000
160052
|
return this.checker.getReturnTypeOfSignature(this);
|
|
160001
160053
|
};
|
|
160054
|
+
SignatureObject.prototype.getTypeParameterAtPosition = function (pos) {
|
|
160055
|
+
var type = this.checker.getParameterType(this, pos);
|
|
160056
|
+
if (type.isIndexType() && ts.isThisTypeParameter(type.type)) {
|
|
160057
|
+
var constraint = type.type.getConstraint();
|
|
160058
|
+
if (constraint) {
|
|
160059
|
+
return this.checker.getIndexType(constraint);
|
|
160060
|
+
}
|
|
160061
|
+
}
|
|
160062
|
+
return type;
|
|
160063
|
+
};
|
|
160002
160064
|
SignatureObject.prototype.getDocumentationComment = function () {
|
|
160003
160065
|
return this.documentationComment || (this.documentationComment = getDocumentationComment(ts.singleElementArray(this.declaration), this.checker));
|
|
160004
160066
|
};
|
|
@@ -171956,14 +172018,14 @@ var ts;
|
|
|
171956
172018
|
if (kind === "completions-full" /* CompletionsFull */)
|
|
171957
172019
|
return completions;
|
|
171958
172020
|
var prefix = args.prefix || "";
|
|
171959
|
-
var entries = ts.
|
|
172021
|
+
var entries = ts.mapDefined(completions.entries, function (entry) {
|
|
171960
172022
|
if (completions.isMemberCompletion || ts.startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) {
|
|
171961
172023
|
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;
|
|
171962
172024
|
var convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : undefined;
|
|
171963
172025
|
// Use `hasAction || undefined` to avoid serializing `false`.
|
|
171964
172026
|
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 };
|
|
171965
172027
|
}
|
|
171966
|
-
})
|
|
172028
|
+
});
|
|
171967
172029
|
if (kind === "completions" /* Completions */) {
|
|
171968
172030
|
if (completions.metadata)
|
|
171969
172031
|
entries.metadata = completions.metadata;
|