typescript 4.6.0-dev.20211102 → 4.6.0-dev.20211106
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/lib.es2022.array.d.ts +123 -0
- package/lib/lib.es2022.d.ts +25 -0
- package/lib/lib.es2022.error.d.ts +28 -0
- package/lib/lib.es2022.full.d.ts +25 -0
- package/lib/lib.es2022.object.d.ts +28 -0
- package/lib/lib.es2022.string.d.ts +27 -0
- package/lib/lib.es5.d.ts +1 -1
- package/lib/lib.esnext.d.ts +1 -1
- package/lib/protocol.d.ts +1 -0
- package/lib/tsc.js +258 -172
- package/lib/tsserver.js +368 -229
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +368 -229
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +367 -229
- package/lib/typescriptServices.d.ts +1 -0
- package/lib/typescriptServices.js +367 -229
- package/lib/typingsInstaller.js +331 -211
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211106";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -5307,7 +5307,7 @@ var ts;
|
|
|
5307
5307
|
Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
|
|
5308
5308
|
Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
|
|
5309
5309
|
Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."),
|
|
5310
|
-
|
|
5310
|
+
Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
5311
5311
|
Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
|
|
5312
5312
|
Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."),
|
|
5313
5313
|
String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
|
|
@@ -5907,11 +5907,12 @@ var ts;
|
|
|
5907
5907
|
Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
|
|
5908
5908
|
Namespace_name_cannot_be_0: diag(2819, ts.DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."),
|
|
5909
5909
|
Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
|
|
5910
|
-
|
|
5910
|
+
Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),
|
|
5911
5911
|
Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
|
|
5912
5912
|
Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
|
|
5913
5913
|
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path."),
|
|
5914
5914
|
Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
|
|
5915
|
+
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
5915
5916
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
5916
5917
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
5917
5918
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -8720,6 +8721,7 @@ var ts;
|
|
|
8720
8721
|
tokenValue = tokenValue.slice(0, -1);
|
|
8721
8722
|
pos--;
|
|
8722
8723
|
}
|
|
8724
|
+
return getIdentifierToken();
|
|
8723
8725
|
}
|
|
8724
8726
|
return token;
|
|
8725
8727
|
}
|
|
@@ -8949,6 +8951,8 @@ var ts;
|
|
|
8949
8951
|
switch (ts.getEmitScriptTarget(options)) {
|
|
8950
8952
|
case 99:
|
|
8951
8953
|
return "lib.esnext.full.d.ts";
|
|
8954
|
+
case 9:
|
|
8955
|
+
return "lib.es2022.full.d.ts";
|
|
8952
8956
|
case 8:
|
|
8953
8957
|
return "lib.es2021.full.d.ts";
|
|
8954
8958
|
case 7:
|
|
@@ -10974,6 +10978,7 @@ var ts;
|
|
|
10974
10978
|
AsyncIterableIterator: ts.emptyArray,
|
|
10975
10979
|
AsyncGenerator: ts.emptyArray,
|
|
10976
10980
|
AsyncGeneratorFunction: ts.emptyArray,
|
|
10981
|
+
NumberFormat: ["formatToParts"]
|
|
10977
10982
|
},
|
|
10978
10983
|
es2019: {
|
|
10979
10984
|
Array: ["flat", "flatMap"],
|
|
@@ -10995,8 +11000,21 @@ var ts;
|
|
|
10995
11000
|
PromiseConstructor: ["any"],
|
|
10996
11001
|
String: ["replaceAll"]
|
|
10997
11002
|
},
|
|
10998
|
-
|
|
10999
|
-
|
|
11003
|
+
es2022: {
|
|
11004
|
+
Array: ["at"],
|
|
11005
|
+
String: ["at"],
|
|
11006
|
+
Int8Array: ["at"],
|
|
11007
|
+
Uint8Array: ["at"],
|
|
11008
|
+
Uint8ClampedArray: ["at"],
|
|
11009
|
+
Int16Array: ["at"],
|
|
11010
|
+
Uint16Array: ["at"],
|
|
11011
|
+
Int32Array: ["at"],
|
|
11012
|
+
Uint32Array: ["at"],
|
|
11013
|
+
Float32Array: ["at"],
|
|
11014
|
+
Float64Array: ["at"],
|
|
11015
|
+
BigInt64Array: ["at"],
|
|
11016
|
+
BigUint64Array: ["at"],
|
|
11017
|
+
ObjectConstructor: ["hasOwn"]
|
|
11000
11018
|
}
|
|
11001
11019
|
};
|
|
11002
11020
|
}
|
|
@@ -17569,7 +17587,7 @@ var ts;
|
|
|
17569
17587
|
var node = createBaseLiteral(8, typeof value === "number" ? value + "" : value);
|
|
17570
17588
|
node.numericLiteralFlags = numericLiteralFlags;
|
|
17571
17589
|
if (numericLiteralFlags & 384)
|
|
17572
|
-
node.transformFlags |=
|
|
17590
|
+
node.transformFlags |= 1024;
|
|
17573
17591
|
return node;
|
|
17574
17592
|
}
|
|
17575
17593
|
function createBigIntLiteral(value) {
|
|
@@ -17586,7 +17604,7 @@ var ts;
|
|
|
17586
17604
|
var node = createBaseStringLiteral(text, isSingleQuote);
|
|
17587
17605
|
node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
|
|
17588
17606
|
if (hasExtendedUnicodeEscape)
|
|
17589
|
-
node.transformFlags |=
|
|
17607
|
+
node.transformFlags |= 1024;
|
|
17590
17608
|
return node;
|
|
17591
17609
|
}
|
|
17592
17610
|
function createStringLiteralFromNode(sourceNode) {
|
|
@@ -17693,8 +17711,8 @@ var ts;
|
|
|
17693
17711
|
switch (token) {
|
|
17694
17712
|
case 131:
|
|
17695
17713
|
transformFlags =
|
|
17696
|
-
|
|
17697
|
-
|
|
17714
|
+
256 |
|
|
17715
|
+
128;
|
|
17698
17716
|
break;
|
|
17699
17717
|
case 123:
|
|
17700
17718
|
case 121:
|
|
@@ -17718,10 +17736,10 @@ var ts;
|
|
|
17718
17736
|
transformFlags = 1;
|
|
17719
17737
|
break;
|
|
17720
17738
|
case 106:
|
|
17721
|
-
transformFlags =
|
|
17739
|
+
transformFlags = 1024 | 33554432;
|
|
17722
17740
|
break;
|
|
17723
17741
|
case 124:
|
|
17724
|
-
transformFlags =
|
|
17742
|
+
transformFlags = 1024;
|
|
17725
17743
|
break;
|
|
17726
17744
|
case 108:
|
|
17727
17745
|
transformFlags = 8192;
|
|
@@ -17798,7 +17816,7 @@ var ts;
|
|
|
17798
17816
|
node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression);
|
|
17799
17817
|
node.transformFlags |=
|
|
17800
17818
|
propagateChildFlags(node.expression) |
|
|
17801
|
-
|
|
17819
|
+
1024 |
|
|
17802
17820
|
65536;
|
|
17803
17821
|
return node;
|
|
17804
17822
|
}
|
|
@@ -17837,7 +17855,7 @@ var ts;
|
|
|
17837
17855
|
if (ts.modifiersToFlags(node.modifiers) & 16476)
|
|
17838
17856
|
node.transformFlags |= 4096;
|
|
17839
17857
|
if (initializer || dotDotDotToken)
|
|
17840
|
-
node.transformFlags |=
|
|
17858
|
+
node.transformFlags |= 1024;
|
|
17841
17859
|
}
|
|
17842
17860
|
return node;
|
|
17843
17861
|
}
|
|
@@ -17931,20 +17949,20 @@ var ts;
|
|
|
17931
17949
|
node.transformFlags |=
|
|
17932
17950
|
propagateChildFlags(node.asteriskToken) |
|
|
17933
17951
|
propagateChildFlags(node.questionToken) |
|
|
17934
|
-
|
|
17952
|
+
1024;
|
|
17935
17953
|
if (questionToken) {
|
|
17936
17954
|
node.transformFlags |= 1;
|
|
17937
17955
|
}
|
|
17938
17956
|
if (ts.modifiersToFlags(node.modifiers) & 256) {
|
|
17939
17957
|
if (asteriskToken) {
|
|
17940
|
-
node.transformFlags |=
|
|
17958
|
+
node.transformFlags |= 128;
|
|
17941
17959
|
}
|
|
17942
17960
|
else {
|
|
17943
|
-
node.transformFlags |=
|
|
17961
|
+
node.transformFlags |= 256;
|
|
17944
17962
|
}
|
|
17945
17963
|
}
|
|
17946
17964
|
else if (asteriskToken) {
|
|
17947
|
-
node.transformFlags |=
|
|
17965
|
+
node.transformFlags |= 2048;
|
|
17948
17966
|
}
|
|
17949
17967
|
return node;
|
|
17950
17968
|
}
|
|
@@ -17976,7 +17994,7 @@ var ts;
|
|
|
17976
17994
|
}
|
|
17977
17995
|
function createConstructorDeclaration(decorators, modifiers, parameters, body) {
|
|
17978
17996
|
var node = createBaseFunctionLikeDeclaration(170, decorators, modifiers, undefined, undefined, parameters, undefined, body);
|
|
17979
|
-
node.transformFlags |=
|
|
17997
|
+
node.transformFlags |= 1024;
|
|
17980
17998
|
return node;
|
|
17981
17999
|
}
|
|
17982
18000
|
function updateConstructorDeclaration(node, decorators, modifiers, parameters, body) {
|
|
@@ -18386,11 +18404,11 @@ var ts;
|
|
|
18386
18404
|
node.elements = createNodeArray(elements);
|
|
18387
18405
|
node.transformFlags |=
|
|
18388
18406
|
propagateChildrenFlags(node.elements) |
|
|
18389
|
-
|
|
18407
|
+
1024 |
|
|
18390
18408
|
262144;
|
|
18391
18409
|
if (node.transformFlags & 16384) {
|
|
18392
18410
|
node.transformFlags |=
|
|
18393
|
-
|
|
18411
|
+
128 |
|
|
18394
18412
|
32768;
|
|
18395
18413
|
}
|
|
18396
18414
|
return node;
|
|
@@ -18405,7 +18423,7 @@ var ts;
|
|
|
18405
18423
|
node.elements = createNodeArray(elements);
|
|
18406
18424
|
node.transformFlags |=
|
|
18407
18425
|
propagateChildrenFlags(node.elements) |
|
|
18408
|
-
|
|
18426
|
+
1024 |
|
|
18409
18427
|
262144;
|
|
18410
18428
|
return node;
|
|
18411
18429
|
}
|
|
@@ -18420,7 +18438,7 @@ var ts;
|
|
|
18420
18438
|
node.dotDotDotToken = dotDotDotToken;
|
|
18421
18439
|
node.transformFlags |=
|
|
18422
18440
|
propagateChildFlags(node.dotDotDotToken) |
|
|
18423
|
-
|
|
18441
|
+
1024;
|
|
18424
18442
|
if (node.propertyName) {
|
|
18425
18443
|
node.transformFlags |= ts.isIdentifier(node.propertyName) ?
|
|
18426
18444
|
propagateIdentifierNameFlags(node.propertyName) :
|
|
@@ -18479,8 +18497,8 @@ var ts;
|
|
|
18479
18497
|
propagateChildFlags(node.name));
|
|
18480
18498
|
if (ts.isSuperKeyword(expression)) {
|
|
18481
18499
|
node.transformFlags |=
|
|
18482
|
-
|
|
18483
|
-
|
|
18500
|
+
256 |
|
|
18501
|
+
128;
|
|
18484
18502
|
}
|
|
18485
18503
|
return node;
|
|
18486
18504
|
}
|
|
@@ -18500,7 +18518,7 @@ var ts;
|
|
|
18500
18518
|
node.questionDotToken = questionDotToken;
|
|
18501
18519
|
node.name = asName(name);
|
|
18502
18520
|
node.transformFlags |=
|
|
18503
|
-
|
|
18521
|
+
32 |
|
|
18504
18522
|
propagateChildFlags(node.expression) |
|
|
18505
18523
|
propagateChildFlags(node.questionDotToken) |
|
|
18506
18524
|
(ts.isIdentifier(node.name) ?
|
|
@@ -18525,8 +18543,8 @@ var ts;
|
|
|
18525
18543
|
propagateChildFlags(node.argumentExpression);
|
|
18526
18544
|
if (ts.isSuperKeyword(expression)) {
|
|
18527
18545
|
node.transformFlags |=
|
|
18528
|
-
|
|
18529
|
-
|
|
18546
|
+
256 |
|
|
18547
|
+
128;
|
|
18530
18548
|
}
|
|
18531
18549
|
return node;
|
|
18532
18550
|
}
|
|
@@ -18549,7 +18567,7 @@ var ts;
|
|
|
18549
18567
|
propagateChildFlags(node.expression) |
|
|
18550
18568
|
propagateChildFlags(node.questionDotToken) |
|
|
18551
18569
|
propagateChildFlags(node.argumentExpression) |
|
|
18552
|
-
|
|
18570
|
+
32;
|
|
18553
18571
|
return node;
|
|
18554
18572
|
}
|
|
18555
18573
|
function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) {
|
|
@@ -18602,7 +18620,7 @@ var ts;
|
|
|
18602
18620
|
propagateChildFlags(node.questionDotToken) |
|
|
18603
18621
|
propagateChildrenFlags(node.typeArguments) |
|
|
18604
18622
|
propagateChildrenFlags(node.arguments) |
|
|
18605
|
-
|
|
18623
|
+
32;
|
|
18606
18624
|
if (node.typeArguments) {
|
|
18607
18625
|
node.transformFlags |= 1;
|
|
18608
18626
|
}
|
|
@@ -18629,7 +18647,7 @@ var ts;
|
|
|
18629
18647
|
propagateChildFlags(node.expression) |
|
|
18630
18648
|
propagateChildrenFlags(node.typeArguments) |
|
|
18631
18649
|
propagateChildrenFlags(node.arguments) |
|
|
18632
|
-
|
|
18650
|
+
32;
|
|
18633
18651
|
if (node.typeArguments) {
|
|
18634
18652
|
node.transformFlags |= 1;
|
|
18635
18653
|
}
|
|
@@ -18651,12 +18669,12 @@ var ts;
|
|
|
18651
18669
|
propagateChildFlags(node.tag) |
|
|
18652
18670
|
propagateChildrenFlags(node.typeArguments) |
|
|
18653
18671
|
propagateChildFlags(node.template) |
|
|
18654
|
-
|
|
18672
|
+
1024;
|
|
18655
18673
|
if (node.typeArguments) {
|
|
18656
18674
|
node.transformFlags |= 1;
|
|
18657
18675
|
}
|
|
18658
18676
|
if (ts.hasInvalidEscape(node.template)) {
|
|
18659
|
-
node.transformFlags |=
|
|
18677
|
+
node.transformFlags |= 128;
|
|
18660
18678
|
}
|
|
18661
18679
|
return node;
|
|
18662
18680
|
}
|
|
@@ -18703,14 +18721,14 @@ var ts;
|
|
|
18703
18721
|
}
|
|
18704
18722
|
if (ts.modifiersToFlags(node.modifiers) & 256) {
|
|
18705
18723
|
if (node.asteriskToken) {
|
|
18706
|
-
node.transformFlags |=
|
|
18724
|
+
node.transformFlags |= 128;
|
|
18707
18725
|
}
|
|
18708
18726
|
else {
|
|
18709
|
-
node.transformFlags |=
|
|
18727
|
+
node.transformFlags |= 256;
|
|
18710
18728
|
}
|
|
18711
18729
|
}
|
|
18712
18730
|
else if (node.asteriskToken) {
|
|
18713
|
-
node.transformFlags |=
|
|
18731
|
+
node.transformFlags |= 2048;
|
|
18714
18732
|
}
|
|
18715
18733
|
return node;
|
|
18716
18734
|
}
|
|
@@ -18730,9 +18748,9 @@ var ts;
|
|
|
18730
18748
|
node.equalsGreaterThanToken = equalsGreaterThanToken !== null && equalsGreaterThanToken !== void 0 ? equalsGreaterThanToken : createToken(38);
|
|
18731
18749
|
node.transformFlags |=
|
|
18732
18750
|
propagateChildFlags(node.equalsGreaterThanToken) |
|
|
18733
|
-
|
|
18751
|
+
1024;
|
|
18734
18752
|
if (ts.modifiersToFlags(node.modifiers) & 256) {
|
|
18735
|
-
node.transformFlags |=
|
|
18753
|
+
node.transformFlags |= 256 | 8192;
|
|
18736
18754
|
}
|
|
18737
18755
|
return node;
|
|
18738
18756
|
}
|
|
@@ -18784,8 +18802,8 @@ var ts;
|
|
|
18784
18802
|
node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
|
|
18785
18803
|
node.transformFlags |=
|
|
18786
18804
|
propagateChildFlags(node.expression) |
|
|
18805
|
+
256 |
|
|
18787
18806
|
128 |
|
|
18788
|
-
64 |
|
|
18789
18807
|
1048576;
|
|
18790
18808
|
return node;
|
|
18791
18809
|
}
|
|
@@ -18841,35 +18859,35 @@ var ts;
|
|
|
18841
18859
|
propagateChildFlags(node.operatorToken) |
|
|
18842
18860
|
propagateChildFlags(node.right);
|
|
18843
18861
|
if (operatorKind === 60) {
|
|
18844
|
-
node.transformFlags |=
|
|
18862
|
+
node.transformFlags |= 32;
|
|
18845
18863
|
}
|
|
18846
18864
|
else if (operatorKind === 63) {
|
|
18847
18865
|
if (ts.isObjectLiteralExpression(node.left)) {
|
|
18848
18866
|
node.transformFlags |=
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18867
|
+
1024 |
|
|
18868
|
+
128 |
|
|
18869
|
+
4096 |
|
|
18852
18870
|
propagateAssignmentPatternFlags(node.left);
|
|
18853
18871
|
}
|
|
18854
18872
|
else if (ts.isArrayLiteralExpression(node.left)) {
|
|
18855
18873
|
node.transformFlags |=
|
|
18856
|
-
|
|
18857
|
-
|
|
18874
|
+
1024 |
|
|
18875
|
+
4096 |
|
|
18858
18876
|
propagateAssignmentPatternFlags(node.left);
|
|
18859
18877
|
}
|
|
18860
18878
|
}
|
|
18861
18879
|
else if (operatorKind === 42 || operatorKind === 67) {
|
|
18862
|
-
node.transformFlags |=
|
|
18880
|
+
node.transformFlags |= 512;
|
|
18863
18881
|
}
|
|
18864
18882
|
else if (ts.isLogicalOrCoalescingAssignmentOperator(operatorKind)) {
|
|
18865
|
-
node.transformFlags |=
|
|
18883
|
+
node.transformFlags |= 16;
|
|
18866
18884
|
}
|
|
18867
18885
|
return node;
|
|
18868
18886
|
}
|
|
18869
18887
|
function propagateAssignmentPatternFlags(node) {
|
|
18870
18888
|
if (node.transformFlags & 32768)
|
|
18871
18889
|
return 32768;
|
|
18872
|
-
if (node.transformFlags &
|
|
18890
|
+
if (node.transformFlags & 128) {
|
|
18873
18891
|
for (var _i = 0, _a = ts.getElementsOfBindingOrAssignmentPattern(node); _i < _a.length; _i++) {
|
|
18874
18892
|
var element = _a[_i];
|
|
18875
18893
|
var target = ts.getTargetOfBindingOrAssignmentElement(element);
|
|
@@ -18877,7 +18895,7 @@ var ts;
|
|
|
18877
18895
|
if (target.transformFlags & 32768) {
|
|
18878
18896
|
return 32768;
|
|
18879
18897
|
}
|
|
18880
|
-
if (target.transformFlags &
|
|
18898
|
+
if (target.transformFlags & 128) {
|
|
18881
18899
|
var flags_1 = propagateAssignmentPatternFlags(target);
|
|
18882
18900
|
if (flags_1)
|
|
18883
18901
|
return flags_1;
|
|
@@ -18925,7 +18943,7 @@ var ts;
|
|
|
18925
18943
|
node.transformFlags |=
|
|
18926
18944
|
propagateChildFlags(node.head) |
|
|
18927
18945
|
propagateChildrenFlags(node.templateSpans) |
|
|
18928
|
-
|
|
18946
|
+
1024;
|
|
18929
18947
|
return node;
|
|
18930
18948
|
}
|
|
18931
18949
|
function updateTemplateExpression(node, head, templateSpans) {
|
|
@@ -18960,9 +18978,9 @@ var ts;
|
|
|
18960
18978
|
node.text = text;
|
|
18961
18979
|
node.rawText = rawText;
|
|
18962
18980
|
node.templateFlags = templateFlags & 2048;
|
|
18963
|
-
node.transformFlags |=
|
|
18981
|
+
node.transformFlags |= 1024;
|
|
18964
18982
|
if (node.templateFlags) {
|
|
18965
|
-
node.transformFlags |=
|
|
18983
|
+
node.transformFlags |= 128;
|
|
18966
18984
|
}
|
|
18967
18985
|
return node;
|
|
18968
18986
|
}
|
|
@@ -18986,8 +19004,8 @@ var ts;
|
|
|
18986
19004
|
node.transformFlags |=
|
|
18987
19005
|
propagateChildFlags(node.expression) |
|
|
18988
19006
|
propagateChildFlags(node.asteriskToken) |
|
|
18989
|
-
|
|
18990
|
-
|
|
19007
|
+
1024 |
|
|
19008
|
+
128 |
|
|
18991
19009
|
524288;
|
|
18992
19010
|
return node;
|
|
18993
19011
|
}
|
|
@@ -19002,7 +19020,7 @@ var ts;
|
|
|
19002
19020
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
19003
19021
|
node.transformFlags |=
|
|
19004
19022
|
propagateChildFlags(node.expression) |
|
|
19005
|
-
|
|
19023
|
+
1024 |
|
|
19006
19024
|
16384;
|
|
19007
19025
|
return node;
|
|
19008
19026
|
}
|
|
@@ -19013,7 +19031,7 @@ var ts;
|
|
|
19013
19031
|
}
|
|
19014
19032
|
function createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members) {
|
|
19015
19033
|
var node = createBaseClassLikeDeclaration(225, decorators, modifiers, name, typeParameters, heritageClauses, members);
|
|
19016
|
-
node.transformFlags |=
|
|
19034
|
+
node.transformFlags |= 1024;
|
|
19017
19035
|
return node;
|
|
19018
19036
|
}
|
|
19019
19037
|
function updateClassExpression(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
|
|
@@ -19036,7 +19054,7 @@ var ts;
|
|
|
19036
19054
|
node.transformFlags |=
|
|
19037
19055
|
propagateChildFlags(node.expression) |
|
|
19038
19056
|
propagateChildrenFlags(node.typeArguments) |
|
|
19039
|
-
|
|
19057
|
+
1024;
|
|
19040
19058
|
return node;
|
|
19041
19059
|
}
|
|
19042
19060
|
function updateExpressionWithTypeArguments(node, expression, typeArguments) {
|
|
@@ -19099,7 +19117,7 @@ var ts;
|
|
|
19099
19117
|
node.transformFlags |= propagateChildFlags(node.name);
|
|
19100
19118
|
switch (keywordToken) {
|
|
19101
19119
|
case 103:
|
|
19102
|
-
node.transformFlags |=
|
|
19120
|
+
node.transformFlags |= 1024;
|
|
19103
19121
|
break;
|
|
19104
19122
|
case 100:
|
|
19105
19123
|
node.transformFlags |= 4;
|
|
@@ -19121,7 +19139,7 @@ var ts;
|
|
|
19121
19139
|
node.transformFlags |=
|
|
19122
19140
|
propagateChildFlags(node.expression) |
|
|
19123
19141
|
propagateChildFlags(node.literal) |
|
|
19124
|
-
|
|
19142
|
+
1024;
|
|
19125
19143
|
return node;
|
|
19126
19144
|
}
|
|
19127
19145
|
function updateTemplateSpan(node, expression, literal) {
|
|
@@ -19132,7 +19150,7 @@ var ts;
|
|
|
19132
19150
|
}
|
|
19133
19151
|
function createSemicolonClassElement() {
|
|
19134
19152
|
var node = createBaseNode(233);
|
|
19135
|
-
node.transformFlags |=
|
|
19153
|
+
node.transformFlags |= 1024;
|
|
19136
19154
|
return node;
|
|
19137
19155
|
}
|
|
19138
19156
|
function createBlock(statements, multiLine) {
|
|
@@ -19275,9 +19293,9 @@ var ts;
|
|
|
19275
19293
|
propagateChildFlags(node.initializer) |
|
|
19276
19294
|
propagateChildFlags(node.expression) |
|
|
19277
19295
|
propagateChildFlags(node.statement) |
|
|
19278
|
-
|
|
19296
|
+
1024;
|
|
19279
19297
|
if (awaitModifier)
|
|
19280
|
-
node.transformFlags |=
|
|
19298
|
+
node.transformFlags |= 128;
|
|
19281
19299
|
return node;
|
|
19282
19300
|
}
|
|
19283
19301
|
function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {
|
|
@@ -19319,7 +19337,7 @@ var ts;
|
|
|
19319
19337
|
node.expression = expression;
|
|
19320
19338
|
node.transformFlags |=
|
|
19321
19339
|
propagateChildFlags(node.expression) |
|
|
19322
|
-
|
|
19340
|
+
128 |
|
|
19323
19341
|
2097152;
|
|
19324
19342
|
return node;
|
|
19325
19343
|
}
|
|
@@ -19432,7 +19450,7 @@ var ts;
|
|
|
19432
19450
|
2097152;
|
|
19433
19451
|
if (flags & 3) {
|
|
19434
19452
|
node.transformFlags |=
|
|
19435
|
-
|
|
19453
|
+
1024 |
|
|
19436
19454
|
131072;
|
|
19437
19455
|
}
|
|
19438
19456
|
return node;
|
|
@@ -19454,14 +19472,14 @@ var ts;
|
|
|
19454
19472
|
2097152;
|
|
19455
19473
|
if (ts.modifiersToFlags(node.modifiers) & 256) {
|
|
19456
19474
|
if (node.asteriskToken) {
|
|
19457
|
-
node.transformFlags |=
|
|
19475
|
+
node.transformFlags |= 128;
|
|
19458
19476
|
}
|
|
19459
19477
|
else {
|
|
19460
|
-
node.transformFlags |=
|
|
19478
|
+
node.transformFlags |= 256;
|
|
19461
19479
|
}
|
|
19462
19480
|
}
|
|
19463
19481
|
else if (node.asteriskToken) {
|
|
19464
|
-
node.transformFlags |=
|
|
19482
|
+
node.transformFlags |= 2048;
|
|
19465
19483
|
}
|
|
19466
19484
|
}
|
|
19467
19485
|
return node;
|
|
@@ -19484,7 +19502,7 @@ var ts;
|
|
|
19484
19502
|
node.transformFlags = 1;
|
|
19485
19503
|
}
|
|
19486
19504
|
else {
|
|
19487
|
-
node.transformFlags |=
|
|
19505
|
+
node.transformFlags |= 1024;
|
|
19488
19506
|
if (node.transformFlags & 4096) {
|
|
19489
19507
|
node.transformFlags |= 1;
|
|
19490
19508
|
}
|
|
@@ -20351,7 +20369,7 @@ var ts;
|
|
|
20351
20369
|
node.transformFlags |= propagateChildrenFlags(node.types);
|
|
20352
20370
|
switch (token) {
|
|
20353
20371
|
case 94:
|
|
20354
|
-
node.transformFlags |=
|
|
20372
|
+
node.transformFlags |= 1024;
|
|
20355
20373
|
break;
|
|
20356
20374
|
case 117:
|
|
20357
20375
|
node.transformFlags |= 1;
|
|
@@ -20377,7 +20395,7 @@ var ts;
|
|
|
20377
20395
|
propagateChildFlags(node.variableDeclaration) |
|
|
20378
20396
|
propagateChildFlags(node.block);
|
|
20379
20397
|
if (!variableDeclaration)
|
|
20380
|
-
node.transformFlags |=
|
|
20398
|
+
node.transformFlags |= 64;
|
|
20381
20399
|
return node;
|
|
20382
20400
|
}
|
|
20383
20401
|
function updateCatchClause(node, variableDeclaration, block) {
|
|
@@ -20416,7 +20434,7 @@ var ts;
|
|
|
20416
20434
|
node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
|
|
20417
20435
|
node.transformFlags |=
|
|
20418
20436
|
propagateChildFlags(node.objectAssignmentInitializer) |
|
|
20419
|
-
|
|
20437
|
+
1024;
|
|
20420
20438
|
return node;
|
|
20421
20439
|
}
|
|
20422
20440
|
function finishUpdateShorthandPropertyAssignment(updated, original) {
|
|
@@ -20443,7 +20461,7 @@ var ts;
|
|
|
20443
20461
|
node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
|
|
20444
20462
|
node.transformFlags |=
|
|
20445
20463
|
propagateChildFlags(node.expression) |
|
|
20446
|
-
|
|
20464
|
+
128 |
|
|
20447
20465
|
32768;
|
|
20448
20466
|
return node;
|
|
20449
20467
|
}
|
|
@@ -30726,6 +30744,7 @@ var ts;
|
|
|
30726
30744
|
["es2019", "lib.es2019.d.ts"],
|
|
30727
30745
|
["es2020", "lib.es2020.d.ts"],
|
|
30728
30746
|
["es2021", "lib.es2021.d.ts"],
|
|
30747
|
+
["es2022", "lib.es2022.d.ts"],
|
|
30729
30748
|
["esnext", "lib.esnext.d.ts"],
|
|
30730
30749
|
["dom", "lib.dom.d.ts"],
|
|
30731
30750
|
["dom.iterable", "lib.dom.iterable.d.ts"],
|
|
@@ -30767,12 +30786,16 @@ var ts;
|
|
|
30767
30786
|
["es2021.string", "lib.es2021.string.d.ts"],
|
|
30768
30787
|
["es2021.weakref", "lib.es2021.weakref.d.ts"],
|
|
30769
30788
|
["es2021.intl", "lib.es2021.intl.d.ts"],
|
|
30770
|
-
["
|
|
30789
|
+
["es2022.array", "lib.es2022.array.d.ts"],
|
|
30790
|
+
["es2022.error", "lib.es2022.error.d.ts"],
|
|
30791
|
+
["es2022.object", "lib.es2022.object.d.ts"],
|
|
30792
|
+
["es2022.string", "lib.es2022.string.d.ts"],
|
|
30793
|
+
["esnext.array", "lib.es2022.array.d.ts"],
|
|
30771
30794
|
["esnext.symbol", "lib.es2019.symbol.d.ts"],
|
|
30772
30795
|
["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
|
|
30773
30796
|
["esnext.intl", "lib.esnext.intl.d.ts"],
|
|
30774
30797
|
["esnext.bigint", "lib.es2020.bigint.d.ts"],
|
|
30775
|
-
["esnext.string", "lib.
|
|
30798
|
+
["esnext.string", "lib.es2022.string.d.ts"],
|
|
30776
30799
|
["esnext.promise", "lib.es2021.promise.d.ts"],
|
|
30777
30800
|
["esnext.weakref", "lib.es2021.weakref.d.ts"]
|
|
30778
30801
|
];
|
|
@@ -30989,6 +31012,7 @@ var ts;
|
|
|
30989
31012
|
es2019: 6,
|
|
30990
31013
|
es2020: 7,
|
|
30991
31014
|
es2021: 8,
|
|
31015
|
+
es2022: 9,
|
|
30992
31016
|
esnext: 99,
|
|
30993
31017
|
})),
|
|
30994
31018
|
affectsSourceFile: true,
|
|
@@ -44623,11 +44647,14 @@ var ts;
|
|
|
44623
44647
|
return type.flags & (128 | 256) ? "" + type.value : undefined;
|
|
44624
44648
|
}
|
|
44625
44649
|
function getTypeForBindingElement(declaration) {
|
|
44626
|
-
var
|
|
44627
|
-
|
|
44628
|
-
|
|
44650
|
+
var parentType = getTypeForBindingElementParent(declaration.parent.parent);
|
|
44651
|
+
return parentType && getBindingElementTypeFromParentType(declaration, parentType);
|
|
44652
|
+
}
|
|
44653
|
+
function getBindingElementTypeFromParentType(declaration, parentType) {
|
|
44654
|
+
if (isTypeAny(parentType)) {
|
|
44629
44655
|
return parentType;
|
|
44630
44656
|
}
|
|
44657
|
+
var pattern = declaration.parent;
|
|
44631
44658
|
if (strictNullChecks && declaration.flags & 8388608 && ts.isParameterDeclaration(declaration)) {
|
|
44632
44659
|
parentType = getNonNullableType(parentType);
|
|
44633
44660
|
}
|
|
@@ -49208,6 +49235,8 @@ var ts;
|
|
|
49208
49235
|
}
|
|
49209
49236
|
if (!(flags & 131072)) {
|
|
49210
49237
|
includes |= flags & 205258751;
|
|
49238
|
+
if (flags & 465829888)
|
|
49239
|
+
includes |= 33554432;
|
|
49211
49240
|
if (type === wildcardType)
|
|
49212
49241
|
includes |= 8388608;
|
|
49213
49242
|
if (!strictNullChecks && flags & 98304) {
|
|
@@ -49400,7 +49429,7 @@ var ts;
|
|
|
49400
49429
|
origin = createOriginUnionOrIntersectionType(1048576, reducedTypes);
|
|
49401
49430
|
}
|
|
49402
49431
|
}
|
|
49403
|
-
var objectFlags = (includes &
|
|
49432
|
+
var objectFlags = (includes & 36323363 ? 0 : 65536) |
|
|
49404
49433
|
(includes & 2097152 ? 33554432 : 0);
|
|
49405
49434
|
return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
|
|
49406
49435
|
}
|
|
@@ -50767,7 +50796,7 @@ var ts;
|
|
|
50767
50796
|
var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
|
|
50768
50797
|
var flags = 4 | (leftProp.flags & 16777216);
|
|
50769
50798
|
var result = createSymbol(flags, leftProp.escapedName);
|
|
50770
|
-
result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
|
|
50799
|
+
result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)], 2);
|
|
50771
50800
|
result.leftSpread = leftProp;
|
|
50772
50801
|
result.rightSpread = rightProp;
|
|
50773
50802
|
result.declarations = declarations;
|
|
@@ -52260,7 +52289,7 @@ var ts;
|
|
|
52260
52289
|
return true;
|
|
52261
52290
|
}
|
|
52262
52291
|
if (source.flags & 524288 && target.flags & 524288) {
|
|
52263
|
-
var related = relation.get(getRelationKey(source, target, 0, relation));
|
|
52292
|
+
var related = relation.get(getRelationKey(source, target, 0, relation, false));
|
|
52264
52293
|
if (related !== undefined) {
|
|
52265
52294
|
return !!(related & 1);
|
|
52266
52295
|
}
|
|
@@ -52974,7 +53003,8 @@ var ts;
|
|
|
52974
53003
|
if (overflow) {
|
|
52975
53004
|
return 0;
|
|
52976
53005
|
}
|
|
52977
|
-
var
|
|
53006
|
+
var keyIntersectionState = intersectionState | (inPropertyCheck ? 16 : 0);
|
|
53007
|
+
var id = getRelationKey(source, target, keyIntersectionState, relation, false);
|
|
52978
53008
|
var entry = relation.get(id);
|
|
52979
53009
|
if (entry !== undefined) {
|
|
52980
53010
|
if (reportErrors && entry & 2 && !(entry & 4)) {
|
|
@@ -52998,12 +53028,9 @@ var ts;
|
|
|
52998
53028
|
targetStack = [];
|
|
52999
53029
|
}
|
|
53000
53030
|
else {
|
|
53001
|
-
var broadestEquivalentId = id.
|
|
53002
|
-
var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
|
|
53003
|
-
return "=" + index;
|
|
53004
|
-
}); }).join(",");
|
|
53031
|
+
var broadestEquivalentId = id.startsWith("*") ? getRelationKey(source, target, keyIntersectionState, relation, true) : undefined;
|
|
53005
53032
|
for (var i = 0; i < maybeCount; i++) {
|
|
53006
|
-
if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
|
|
53033
|
+
if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
|
|
53007
53034
|
return 3;
|
|
53008
53035
|
}
|
|
53009
53036
|
}
|
|
@@ -53245,7 +53272,7 @@ var ts;
|
|
|
53245
53272
|
originalErrorInfo = undefined;
|
|
53246
53273
|
}
|
|
53247
53274
|
}
|
|
53248
|
-
else if (isGenericMappedType(target)) {
|
|
53275
|
+
else if (isGenericMappedType(target) && relation !== identityRelation) {
|
|
53249
53276
|
var keysRemapped = !!target.declaration.nameType;
|
|
53250
53277
|
var templateType = getTemplateTypeFromMappedType(target);
|
|
53251
53278
|
var modifiers = getMappedTypeModifiers(target);
|
|
@@ -54277,40 +54304,48 @@ var ts;
|
|
|
54277
54304
|
function isTypeReferenceWithGenericArguments(type) {
|
|
54278
54305
|
return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144) || isTypeReferenceWithGenericArguments(t); });
|
|
54279
54306
|
}
|
|
54280
|
-
function
|
|
54281
|
-
|
|
54282
|
-
var
|
|
54283
|
-
|
|
54284
|
-
|
|
54285
|
-
|
|
54286
|
-
|
|
54287
|
-
|
|
54288
|
-
|
|
54289
|
-
|
|
54307
|
+
function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) {
|
|
54308
|
+
var typeParameters = [];
|
|
54309
|
+
var constraintMarker = "";
|
|
54310
|
+
var sourceId = getTypeReferenceId(source, 0);
|
|
54311
|
+
var targetId = getTypeReferenceId(target, 0);
|
|
54312
|
+
return "" + constraintMarker + sourceId + "," + targetId + postFix;
|
|
54313
|
+
function getTypeReferenceId(type, depth) {
|
|
54314
|
+
if (depth === void 0) { depth = 0; }
|
|
54315
|
+
var result = "" + type.target.id;
|
|
54316
|
+
for (var _i = 0, _a = getTypeArguments(type); _i < _a.length; _i++) {
|
|
54317
|
+
var t = _a[_i];
|
|
54318
|
+
if (t.flags & 262144) {
|
|
54319
|
+
if (ignoreConstraints || isUnconstrainedTypeParameter(t)) {
|
|
54320
|
+
var index = typeParameters.indexOf(t);
|
|
54321
|
+
if (index < 0) {
|
|
54322
|
+
index = typeParameters.length;
|
|
54323
|
+
typeParameters.push(t);
|
|
54324
|
+
}
|
|
54325
|
+
result += "=" + index;
|
|
54326
|
+
continue;
|
|
54327
|
+
}
|
|
54328
|
+
constraintMarker = "*";
|
|
54329
|
+
}
|
|
54330
|
+
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
54331
|
+
result += "<" + getTypeReferenceId(t, depth + 1) + ">";
|
|
54332
|
+
continue;
|
|
54290
54333
|
}
|
|
54291
|
-
result += "=" + index;
|
|
54292
|
-
}
|
|
54293
|
-
else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) {
|
|
54294
|
-
result += "<" + getTypeReferenceId(t, typeParameters, depth + 1) + ">";
|
|
54295
|
-
}
|
|
54296
|
-
else {
|
|
54297
54334
|
result += "-" + t.id;
|
|
54298
54335
|
}
|
|
54336
|
+
return result;
|
|
54299
54337
|
}
|
|
54300
|
-
return result;
|
|
54301
54338
|
}
|
|
54302
|
-
function getRelationKey(source, target, intersectionState, relation) {
|
|
54339
|
+
function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) {
|
|
54303
54340
|
if (relation === identityRelation && source.id > target.id) {
|
|
54304
54341
|
var temp = source;
|
|
54305
54342
|
source = target;
|
|
54306
54343
|
target = temp;
|
|
54307
54344
|
}
|
|
54308
54345
|
var postFix = intersectionState ? ":" + intersectionState : "";
|
|
54309
|
-
|
|
54310
|
-
|
|
54311
|
-
|
|
54312
|
-
}
|
|
54313
|
-
return source.id + "," + target.id + postFix;
|
|
54346
|
+
return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ?
|
|
54347
|
+
getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) :
|
|
54348
|
+
source.id + "," + target.id + postFix;
|
|
54314
54349
|
}
|
|
54315
54350
|
function forEachProperty(prop, callback) {
|
|
54316
54351
|
if (ts.getCheckFlags(prop) & 6) {
|
|
@@ -54349,16 +54384,21 @@ var ts;
|
|
|
54349
54384
|
!hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
|
|
54350
54385
|
}
|
|
54351
54386
|
function isDeeplyNestedType(type, stack, depth, maxDepth) {
|
|
54352
|
-
if (maxDepth === void 0) { maxDepth =
|
|
54387
|
+
if (maxDepth === void 0) { maxDepth = 3; }
|
|
54353
54388
|
if (depth >= maxDepth) {
|
|
54354
54389
|
var identity_1 = getRecursionIdentity(type);
|
|
54355
54390
|
var count = 0;
|
|
54391
|
+
var lastTypeId = 0;
|
|
54356
54392
|
for (var i = 0; i < depth; i++) {
|
|
54357
|
-
|
|
54358
|
-
|
|
54359
|
-
if (
|
|
54360
|
-
|
|
54393
|
+
var t = stack[i];
|
|
54394
|
+
if (getRecursionIdentity(t) === identity_1) {
|
|
54395
|
+
if (t.id >= lastTypeId) {
|
|
54396
|
+
count++;
|
|
54397
|
+
if (count >= maxDepth) {
|
|
54398
|
+
return true;
|
|
54399
|
+
}
|
|
54361
54400
|
}
|
|
54401
|
+
lastTypeId = t.id;
|
|
54362
54402
|
}
|
|
54363
54403
|
}
|
|
54364
54404
|
}
|
|
@@ -54998,7 +55038,8 @@ var ts;
|
|
|
54998
55038
|
(resolveName(param, param.name.escapedText, 788968, undefined, param.name.escapedText, true) ||
|
|
54999
55039
|
param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
|
|
55000
55040
|
var newName = "arg" + param.parent.parameters.indexOf(param);
|
|
55001
|
-
|
|
55041
|
+
var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
|
|
55042
|
+
errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
|
|
55002
55043
|
return;
|
|
55003
55044
|
}
|
|
55004
55045
|
diagnostic = declaration.dotDotDotToken ?
|
|
@@ -56182,27 +56223,6 @@ var ts;
|
|
|
56182
56223
|
}
|
|
56183
56224
|
return false;
|
|
56184
56225
|
}
|
|
56185
|
-
function getPropertyAccess(expr) {
|
|
56186
|
-
if (ts.isAccessExpression(expr)) {
|
|
56187
|
-
return expr;
|
|
56188
|
-
}
|
|
56189
|
-
if (ts.isIdentifier(expr)) {
|
|
56190
|
-
var symbol = getResolvedSymbol(expr);
|
|
56191
|
-
if (isConstVariable(symbol)) {
|
|
56192
|
-
var declaration = symbol.valueDeclaration;
|
|
56193
|
-
if (ts.isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && ts.isAccessExpression(declaration.initializer)) {
|
|
56194
|
-
return declaration.initializer;
|
|
56195
|
-
}
|
|
56196
|
-
if (ts.isBindingElement(declaration) && !declaration.initializer) {
|
|
56197
|
-
var parent = declaration.parent.parent;
|
|
56198
|
-
if (ts.isVariableDeclaration(parent) && !parent.type && parent.initializer && (ts.isIdentifier(parent.initializer) || ts.isAccessExpression(parent.initializer))) {
|
|
56199
|
-
return declaration;
|
|
56200
|
-
}
|
|
56201
|
-
}
|
|
56202
|
-
}
|
|
56203
|
-
}
|
|
56204
|
-
return undefined;
|
|
56205
|
-
}
|
|
56206
56226
|
function getAccessedPropertyName(access) {
|
|
56207
56227
|
var propertyName;
|
|
56208
56228
|
return access.kind === 205 ? access.name.escapedText :
|
|
@@ -57037,20 +57057,21 @@ var ts;
|
|
|
57037
57057
|
}
|
|
57038
57058
|
return false;
|
|
57039
57059
|
}
|
|
57040
|
-
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer) {
|
|
57060
|
+
function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, flowNode) {
|
|
57041
57061
|
if (initialType === void 0) { initialType = declaredType; }
|
|
57062
|
+
if (flowNode === void 0) { flowNode = reference.flowNode; }
|
|
57042
57063
|
var key;
|
|
57043
57064
|
var isKeySet = false;
|
|
57044
57065
|
var flowDepth = 0;
|
|
57045
57066
|
if (flowAnalysisDisabled) {
|
|
57046
57067
|
return errorType;
|
|
57047
57068
|
}
|
|
57048
|
-
if (!
|
|
57069
|
+
if (!flowNode) {
|
|
57049
57070
|
return declaredType;
|
|
57050
57071
|
}
|
|
57051
57072
|
flowInvocationCount++;
|
|
57052
57073
|
var sharedFlowStart = sharedFlowCount;
|
|
57053
|
-
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(
|
|
57074
|
+
var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode));
|
|
57054
57075
|
sharedFlowCount = sharedFlowStart;
|
|
57055
57076
|
var resultType = ts.getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType);
|
|
57056
57077
|
if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 229 && !(resultType.flags & 131072) && getTypeWithFacts(resultType, 2097152).flags & 131072) {
|
|
@@ -57407,13 +57428,52 @@ var ts;
|
|
|
57407
57428
|
}
|
|
57408
57429
|
return result;
|
|
57409
57430
|
}
|
|
57431
|
+
function getCandidateDiscriminantPropertyAccess(expr) {
|
|
57432
|
+
if (ts.isBindingPattern(reference)) {
|
|
57433
|
+
if (ts.isIdentifier(expr)) {
|
|
57434
|
+
var symbol = getResolvedSymbol(expr);
|
|
57435
|
+
var declaration = symbol.valueDeclaration;
|
|
57436
|
+
if (declaration && ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && reference === declaration.parent) {
|
|
57437
|
+
return declaration;
|
|
57438
|
+
}
|
|
57439
|
+
}
|
|
57440
|
+
}
|
|
57441
|
+
else if (ts.isAccessExpression(expr)) {
|
|
57442
|
+
if (isMatchingReference(reference, expr.expression)) {
|
|
57443
|
+
return expr;
|
|
57444
|
+
}
|
|
57445
|
+
}
|
|
57446
|
+
else if (ts.isIdentifier(expr)) {
|
|
57447
|
+
var symbol = getResolvedSymbol(expr);
|
|
57448
|
+
if (isConstVariable(symbol)) {
|
|
57449
|
+
var declaration = symbol.valueDeclaration;
|
|
57450
|
+
if (ts.isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && ts.isAccessExpression(declaration.initializer) &&
|
|
57451
|
+
isMatchingReference(reference, declaration.initializer.expression)) {
|
|
57452
|
+
return declaration.initializer;
|
|
57453
|
+
}
|
|
57454
|
+
if (ts.isBindingElement(declaration) && !declaration.initializer) {
|
|
57455
|
+
var parent = declaration.parent.parent;
|
|
57456
|
+
if (ts.isVariableDeclaration(parent) && !parent.type && parent.initializer && (ts.isIdentifier(parent.initializer) || ts.isAccessExpression(parent.initializer)) &&
|
|
57457
|
+
isMatchingReference(reference, parent.initializer)) {
|
|
57458
|
+
return declaration;
|
|
57459
|
+
}
|
|
57460
|
+
}
|
|
57461
|
+
}
|
|
57462
|
+
}
|
|
57463
|
+
return undefined;
|
|
57464
|
+
}
|
|
57410
57465
|
function getDiscriminantPropertyAccess(expr, computedType) {
|
|
57411
|
-
var access, name;
|
|
57412
57466
|
var type = declaredType.flags & 1048576 ? declaredType : computedType;
|
|
57413
|
-
|
|
57414
|
-
|
|
57415
|
-
|
|
57416
|
-
|
|
57467
|
+
if (type.flags & 1048576) {
|
|
57468
|
+
var access = getCandidateDiscriminantPropertyAccess(expr);
|
|
57469
|
+
if (access) {
|
|
57470
|
+
var name = getAccessedPropertyName(access);
|
|
57471
|
+
if (name && isDiscriminantProperty(type, name)) {
|
|
57472
|
+
return access;
|
|
57473
|
+
}
|
|
57474
|
+
}
|
|
57475
|
+
}
|
|
57476
|
+
return undefined;
|
|
57417
57477
|
}
|
|
57418
57478
|
function narrowTypeByDiscriminant(type, access, narrowType) {
|
|
57419
57479
|
var propName = getAccessedPropertyName(access);
|
|
@@ -58056,6 +58116,26 @@ var ts;
|
|
|
58056
58116
|
}
|
|
58057
58117
|
}
|
|
58058
58118
|
}
|
|
58119
|
+
function getNarrowedTypeOfSymbol(symbol, location) {
|
|
58120
|
+
var declaration = symbol.valueDeclaration;
|
|
58121
|
+
if (declaration && ts.isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) {
|
|
58122
|
+
var parent = declaration.parent.parent;
|
|
58123
|
+
if (parent.kind === 253 && ts.getCombinedNodeFlags(declaration) & 2 || parent.kind === 163) {
|
|
58124
|
+
var links = getNodeLinks(location);
|
|
58125
|
+
if (!(links.flags & 268435456)) {
|
|
58126
|
+
links.flags |= 268435456;
|
|
58127
|
+
var parentType = getTypeForBindingElementParent(parent);
|
|
58128
|
+
links.flags &= ~268435456;
|
|
58129
|
+
if (parentType && parentType.flags & 1048576 && !(parent.kind === 163 && isSymbolAssigned(symbol))) {
|
|
58130
|
+
var pattern = declaration.parent;
|
|
58131
|
+
var narrowedType = getFlowTypeOfReference(pattern, parentType, parentType, undefined, location.flowNode);
|
|
58132
|
+
return getBindingElementTypeFromParentType(declaration, narrowedType);
|
|
58133
|
+
}
|
|
58134
|
+
}
|
|
58135
|
+
}
|
|
58136
|
+
}
|
|
58137
|
+
return getTypeOfSymbol(symbol);
|
|
58138
|
+
}
|
|
58059
58139
|
function checkIdentifier(node, checkMode) {
|
|
58060
58140
|
var symbol = getResolvedSymbol(node);
|
|
58061
58141
|
if (symbol === unknownSymbol) {
|
|
@@ -58115,7 +58195,7 @@ var ts;
|
|
|
58115
58195
|
}
|
|
58116
58196
|
}
|
|
58117
58197
|
checkNestedBlockScopedBinding(node, symbol);
|
|
58118
|
-
var type =
|
|
58198
|
+
var type = getNarrowedTypeOfSymbol(localOrExportSymbol, node);
|
|
58119
58199
|
var assignmentKind = ts.getAssignmentTargetKind(node);
|
|
58120
58200
|
if (assignmentKind) {
|
|
58121
58201
|
if (!(localOrExportSymbol.flags & 3) &&
|
|
@@ -58977,13 +59057,13 @@ var ts;
|
|
|
58977
59057
|
function isCircularMappedProperty(symbol) {
|
|
58978
59058
|
return !!(ts.getCheckFlags(symbol) & 262144 && !symbol.type && findResolutionCycleStartIndex(symbol, 0) >= 0);
|
|
58979
59059
|
}
|
|
58980
|
-
function getTypeOfPropertyOfContextualType(type, name) {
|
|
59060
|
+
function getTypeOfPropertyOfContextualType(type, name, nameType) {
|
|
58981
59061
|
return mapType(type, function (t) {
|
|
58982
59062
|
var _a;
|
|
58983
59063
|
if (isGenericMappedType(t)) {
|
|
58984
59064
|
var constraint = getConstraintTypeFromMappedType(t);
|
|
58985
59065
|
var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
|
|
58986
|
-
var propertyNameType = getStringLiteralType(ts.unescapeLeadingUnderscores(name));
|
|
59066
|
+
var propertyNameType = nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name));
|
|
58987
59067
|
if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
|
|
58988
59068
|
return substituteIndexedMappedType(t, propertyNameType);
|
|
58989
59069
|
}
|
|
@@ -58999,7 +59079,7 @@ var ts;
|
|
|
58999
59079
|
return restType;
|
|
59000
59080
|
}
|
|
59001
59081
|
}
|
|
59002
|
-
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
59082
|
+
return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
|
|
59003
59083
|
}
|
|
59004
59084
|
return undefined;
|
|
59005
59085
|
}, true);
|
|
@@ -59020,7 +59100,8 @@ var ts;
|
|
|
59020
59100
|
var type = getApparentTypeOfContextualType(objectLiteral, contextFlags);
|
|
59021
59101
|
if (type) {
|
|
59022
59102
|
if (hasBindableName(element)) {
|
|
59023
|
-
|
|
59103
|
+
var symbol = getSymbolOfNode(element);
|
|
59104
|
+
return getTypeOfPropertyOfContextualType(type, symbol.escapedName, getSymbolLinks(symbol).nameType);
|
|
59024
59105
|
}
|
|
59025
59106
|
if (element.name) {
|
|
59026
59107
|
var nameType_2 = getLiteralTypeFromPropertyName(element.name);
|
|
@@ -69345,8 +69426,11 @@ var ts;
|
|
|
69345
69426
|
function checkAssertClause(declaration) {
|
|
69346
69427
|
var _a;
|
|
69347
69428
|
if (declaration.assertClause) {
|
|
69348
|
-
|
|
69349
|
-
|
|
69429
|
+
var mode = (moduleKind === ts.ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier);
|
|
69430
|
+
if (mode !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.ESNext) {
|
|
69431
|
+
return grammarErrorOnNode(declaration.assertClause, moduleKind === ts.ModuleKind.NodeNext
|
|
69432
|
+
? ts.Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls
|
|
69433
|
+
: ts.Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext);
|
|
69350
69434
|
}
|
|
69351
69435
|
if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
|
|
69352
69436
|
return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
|
|
@@ -72849,11 +72933,11 @@ var ts;
|
|
|
72849
72933
|
return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
|
|
72850
72934
|
}
|
|
72851
72935
|
var nodeArguments = node.arguments;
|
|
72852
|
-
if (moduleKind !== ts.ModuleKind.ESNext) {
|
|
72936
|
+
if (moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.NodeNext) {
|
|
72853
72937
|
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
|
72854
72938
|
if (nodeArguments.length > 1) {
|
|
72855
72939
|
var assertionArgument = nodeArguments[1];
|
|
72856
|
-
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.
|
|
72940
|
+
return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_or_nodenext);
|
|
72857
72941
|
}
|
|
72858
72942
|
}
|
|
72859
72943
|
if (nodeArguments.length === 0 || nodeArguments.length > 2) {
|
|
@@ -77952,7 +78036,7 @@ var ts;
|
|
|
77952
78036
|
return ts.visitEachChild(node, visitor, context);
|
|
77953
78037
|
}
|
|
77954
78038
|
function visitor(node) {
|
|
77955
|
-
if ((node.transformFlags &
|
|
78039
|
+
if ((node.transformFlags & 256) === 0) {
|
|
77956
78040
|
return node;
|
|
77957
78041
|
}
|
|
77958
78042
|
switch (node.kind) {
|
|
@@ -78430,7 +78514,7 @@ var ts;
|
|
|
78430
78514
|
return ts.visitEachChild(node, visitor, context);
|
|
78431
78515
|
}
|
|
78432
78516
|
function visitorWorker(node, expressionResultIsUnused) {
|
|
78433
|
-
if ((node.transformFlags &
|
|
78517
|
+
if ((node.transformFlags & 128) === 0) {
|
|
78434
78518
|
return node;
|
|
78435
78519
|
}
|
|
78436
78520
|
switch (node.kind) {
|
|
@@ -79012,7 +79096,7 @@ var ts;
|
|
|
79012
79096
|
return ts.visitEachChild(node, visitor, context);
|
|
79013
79097
|
}
|
|
79014
79098
|
function visitor(node) {
|
|
79015
|
-
if ((node.transformFlags &
|
|
79099
|
+
if ((node.transformFlags & 64) === 0) {
|
|
79016
79100
|
return node;
|
|
79017
79101
|
}
|
|
79018
79102
|
switch (node.kind) {
|
|
@@ -79043,7 +79127,7 @@ var ts;
|
|
|
79043
79127
|
return ts.visitEachChild(node, visitor, context);
|
|
79044
79128
|
}
|
|
79045
79129
|
function visitor(node) {
|
|
79046
|
-
if ((node.transformFlags &
|
|
79130
|
+
if ((node.transformFlags & 32) === 0) {
|
|
79047
79131
|
return node;
|
|
79048
79132
|
}
|
|
79049
79133
|
switch (node.kind) {
|
|
@@ -79211,7 +79295,7 @@ var ts;
|
|
|
79211
79295
|
return ts.visitEachChild(node, visitor, context);
|
|
79212
79296
|
}
|
|
79213
79297
|
function visitor(node) {
|
|
79214
|
-
if ((node.transformFlags &
|
|
79298
|
+
if ((node.transformFlags & 16) === 0) {
|
|
79215
79299
|
return node;
|
|
79216
79300
|
}
|
|
79217
79301
|
switch (node.kind) {
|
|
@@ -79907,7 +79991,7 @@ var ts;
|
|
|
79907
79991
|
return ts.visitEachChild(node, visitor, context);
|
|
79908
79992
|
}
|
|
79909
79993
|
function visitor(node) {
|
|
79910
|
-
if ((node.transformFlags &
|
|
79994
|
+
if ((node.transformFlags & 512) === 0) {
|
|
79911
79995
|
return node;
|
|
79912
79996
|
}
|
|
79913
79997
|
switch (node.kind) {
|
|
@@ -80023,7 +80107,7 @@ var ts;
|
|
|
80023
80107
|
|| ts.isBlock(node));
|
|
80024
80108
|
}
|
|
80025
80109
|
function shouldVisitNode(node) {
|
|
80026
|
-
return (node.transformFlags &
|
|
80110
|
+
return (node.transformFlags & 1024) !== 0
|
|
80027
80111
|
|| convertedLoopState !== undefined
|
|
80028
80112
|
|| (hierarchyFacts & 8192 && isOrMayContainReturnCompletion(node))
|
|
80029
80113
|
|| (ts.isIterationStatement(node, false) && shouldConvertIterationStatement(node))
|
|
@@ -82070,7 +82154,7 @@ var ts;
|
|
|
82070
82154
|
var withBlockStack;
|
|
82071
82155
|
return ts.chainBundle(context, transformSourceFile);
|
|
82072
82156
|
function transformSourceFile(node) {
|
|
82073
|
-
if (node.isDeclarationFile || (node.transformFlags &
|
|
82157
|
+
if (node.isDeclarationFile || (node.transformFlags & 2048) === 0) {
|
|
82074
82158
|
return node;
|
|
82075
82159
|
}
|
|
82076
82160
|
var visited = ts.visitEachChild(node, visitor, context);
|
|
@@ -82088,7 +82172,7 @@ var ts;
|
|
|
82088
82172
|
else if (ts.isFunctionLikeDeclaration(node) && node.asteriskToken) {
|
|
82089
82173
|
return visitGenerator(node);
|
|
82090
82174
|
}
|
|
82091
|
-
else if (transformFlags &
|
|
82175
|
+
else if (transformFlags & 2048) {
|
|
82092
82176
|
return ts.visitEachChild(node, visitor, context);
|
|
82093
82177
|
}
|
|
82094
82178
|
else {
|
|
@@ -82134,7 +82218,7 @@ var ts;
|
|
|
82134
82218
|
if (node.transformFlags & 524288) {
|
|
82135
82219
|
return visitJavaScriptContainingYield(node);
|
|
82136
82220
|
}
|
|
82137
|
-
else if (node.transformFlags & (
|
|
82221
|
+
else if (node.transformFlags & (2048 | 2097152)) {
|
|
82138
82222
|
return ts.visitEachChild(node, visitor, context);
|
|
82139
82223
|
}
|
|
82140
82224
|
else {
|
|
@@ -83881,7 +83965,7 @@ var ts;
|
|
|
83881
83965
|
}
|
|
83882
83966
|
}
|
|
83883
83967
|
function visitorWorker(node, valueIsDiscarded) {
|
|
83884
|
-
if (!(node.transformFlags & (4194304 |
|
|
83968
|
+
if (!(node.transformFlags & (4194304 | 4096 | 67108864))) {
|
|
83885
83969
|
return node;
|
|
83886
83970
|
}
|
|
83887
83971
|
switch (node.kind) {
|
|
@@ -85268,7 +85352,7 @@ var ts;
|
|
|
85268
85352
|
return node;
|
|
85269
85353
|
}
|
|
85270
85354
|
function visitorWorker(node, valueIsDiscarded) {
|
|
85271
|
-
if (!(node.transformFlags & (
|
|
85355
|
+
if (!(node.transformFlags & (4096 | 4194304 | 67108864))) {
|
|
85272
85356
|
return node;
|
|
85273
85357
|
}
|
|
85274
85358
|
switch (node.kind) {
|
|
@@ -98618,13 +98702,15 @@ var ts;
|
|
|
98618
98702
|
var moduleFileToTry = path;
|
|
98619
98703
|
if (host.fileExists(packageJsonPath)) {
|
|
98620
98704
|
var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
|
|
98621
|
-
|
|
98622
|
-
|
|
98623
|
-
|
|
98624
|
-
|
|
98625
|
-
|
|
98626
|
-
|
|
98627
|
-
|
|
98705
|
+
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
98706
|
+
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
|
|
98707
|
+
if (fromExports) {
|
|
98708
|
+
var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
|
|
98709
|
+
return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
|
|
98710
|
+
}
|
|
98711
|
+
if (packageJsonContent.exports) {
|
|
98712
|
+
return { moduleFileToTry: path, blockedByExports: true };
|
|
98713
|
+
}
|
|
98628
98714
|
}
|
|
98629
98715
|
var versionPaths = packageJsonContent.typesVersions
|
|
98630
98716
|
? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
|