typescript 4.7.0-dev.20220216 → 4.7.0-dev.20220220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cs/diagnosticMessages.generated.json +5 -1
- package/lib/de/diagnosticMessages.generated.json +5 -1
- package/lib/es/diagnosticMessages.generated.json +5 -1
- package/lib/fr/diagnosticMessages.generated.json +5 -1
- package/lib/it/diagnosticMessages.generated.json +5 -1
- package/lib/ja/diagnosticMessages.generated.json +5 -1
- package/lib/ko/diagnosticMessages.generated.json +5 -1
- package/lib/lib.es2015.core.d.ts +3 -3
- package/lib/lib.es2021.intl.d.ts +6 -6
- package/lib/lib.es5.d.ts +3 -1
- package/lib/lib.esnext.intl.d.ts +4 -4
- package/lib/pl/diagnosticMessages.generated.json +5 -1
- package/lib/pt-br/diagnosticMessages.generated.json +5 -1
- package/lib/ru/diagnosticMessages.generated.json +5 -1
- package/lib/tr/diagnosticMessages.generated.json +5 -1
- package/lib/tsc.js +296 -212
- package/lib/tsserver.js +366 -262
- package/lib/tsserverlibrary.d.ts +7 -7
- package/lib/tsserverlibrary.js +360 -257
- package/lib/typescript.d.ts +7 -7
- package/lib/typescript.js +360 -257
- package/lib/typescriptServices.d.ts +7 -7
- package/lib/typescriptServices.js +360 -257
- package/lib/typingsInstaller.js +322 -244
- package/lib/zh-cn/diagnosticMessages.generated.json +5 -1
- package/lib/zh-tw/diagnosticMessages.generated.json +5 -1
- 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.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220220";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -2018,7 +2018,7 @@ var ts;
|
|
|
2018
2018
|
Debug.checkEachDefined = checkEachDefined;
|
|
2019
2019
|
function assertNever(member, message, stackCrawlMark) {
|
|
2020
2020
|
if (message === void 0) { message = "Illegal value:"; }
|
|
2021
|
-
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos")
|
|
2021
|
+
var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
|
|
2022
2022
|
return fail(message + " " + detail, stackCrawlMark || assertNever);
|
|
2023
2023
|
}
|
|
2024
2024
|
Debug.assertNever = assertNever;
|
|
@@ -5354,7 +5354,6 @@ var ts;
|
|
|
5354
5354
|
Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"),
|
|
5355
5355
|
Unexpected_token_Did_you_mean_or_gt: diag(1382, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"),
|
|
5356
5356
|
Only_named_exports_may_use_export_type: diag(1383, ts.DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."),
|
|
5357
|
-
A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list: diag(1384, ts.DiagnosticCategory.Error, "A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list_1384", "A 'new' expression with type arguments must always be followed by a parenthesized argument list."),
|
|
5358
5357
|
Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."),
|
|
5359
5358
|
Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, ts.DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."),
|
|
5360
5359
|
Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
|
|
@@ -5740,6 +5739,7 @@ var ts;
|
|
|
5740
5739
|
Cannot_assign_to_0_because_it_is_an_import: diag(2632, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."),
|
|
5741
5740
|
JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, ts.DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"),
|
|
5742
5741
|
_0_index_signatures_are_incompatible: diag(2634, ts.DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."),
|
|
5742
|
+
Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, ts.DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."),
|
|
5743
5743
|
Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, ts.DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
|
|
5744
5744
|
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, ts.DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
|
|
5745
5745
|
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, ts.DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
|
|
@@ -6785,7 +6785,7 @@ var ts;
|
|
|
6785
6785
|
Fix_all_implicit_this_errors: diag(95107, ts.DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"),
|
|
6786
6786
|
Wrap_invalid_character_in_an_expression_container: diag(95108, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"),
|
|
6787
6787
|
Wrap_all_invalid_characters_in_an_expression_container: diag(95109, ts.DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"),
|
|
6788
|
-
|
|
6788
|
+
Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, ts.DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"),
|
|
6789
6789
|
Add_a_return_statement: diag(95111, ts.DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"),
|
|
6790
6790
|
Remove_braces_from_arrow_function_body: diag(95112, ts.DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"),
|
|
6791
6791
|
Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, ts.DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"),
|
|
@@ -10096,6 +10096,7 @@ var ts;
|
|
|
10096
10096
|
case 110:
|
|
10097
10097
|
case 106:
|
|
10098
10098
|
case 229:
|
|
10099
|
+
case 227:
|
|
10099
10100
|
case 230:
|
|
10100
10101
|
case 100:
|
|
10101
10102
|
return true;
|
|
@@ -11624,7 +11625,7 @@ var ts;
|
|
|
11624
11625
|
case 114:
|
|
11625
11626
|
return node.parent.kind !== 216;
|
|
11626
11627
|
case 227:
|
|
11627
|
-
return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
|
|
11628
|
+
return ts.isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node);
|
|
11628
11629
|
case 162:
|
|
11629
11630
|
return node.parent.kind === 194 || node.parent.kind === 189;
|
|
11630
11631
|
case 79:
|
|
@@ -11650,7 +11651,7 @@ var ts;
|
|
|
11650
11651
|
}
|
|
11651
11652
|
switch (parent.kind) {
|
|
11652
11653
|
case 227:
|
|
11653
|
-
return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
|
|
11654
|
+
return ts.isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
|
|
11654
11655
|
case 162:
|
|
11655
11656
|
return node === parent.constraint;
|
|
11656
11657
|
case 342:
|
|
@@ -12289,7 +12290,7 @@ var ts;
|
|
|
12289
12290
|
case 296:
|
|
12290
12291
|
return true;
|
|
12291
12292
|
case 227:
|
|
12292
|
-
return parent.expression === node &&
|
|
12293
|
+
return parent.expression === node && !isPartOfTypeNode(parent);
|
|
12293
12294
|
case 295:
|
|
12294
12295
|
return parent.objectAssignmentInitializer === node;
|
|
12295
12296
|
default:
|
|
@@ -18275,15 +18276,17 @@ var ts;
|
|
|
18275
18276
|
function updateConstructorTypeNode2(node, typeParameters, parameters, type) {
|
|
18276
18277
|
return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type);
|
|
18277
18278
|
}
|
|
18278
|
-
function createTypeQueryNode(exprName) {
|
|
18279
|
+
function createTypeQueryNode(exprName, typeArguments) {
|
|
18279
18280
|
var node = createBaseNode(180);
|
|
18280
18281
|
node.exprName = exprName;
|
|
18282
|
+
node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
|
|
18281
18283
|
node.transformFlags = 1;
|
|
18282
18284
|
return node;
|
|
18283
18285
|
}
|
|
18284
|
-
function updateTypeQueryNode(node, exprName) {
|
|
18286
|
+
function updateTypeQueryNode(node, exprName, typeArguments) {
|
|
18285
18287
|
return node.exprName !== exprName
|
|
18286
|
-
|
|
18288
|
+
|| node.typeArguments !== typeArguments
|
|
18289
|
+
? update(createTypeQueryNode(exprName, typeArguments), node)
|
|
18287
18290
|
: node;
|
|
18288
18291
|
}
|
|
18289
18292
|
function createTypeLiteralNode(members) {
|
|
@@ -24125,7 +24128,8 @@ var ts;
|
|
|
24125
24128
|
visitNode(cbNode, node.parameterName) ||
|
|
24126
24129
|
visitNode(cbNode, node.type);
|
|
24127
24130
|
case 180:
|
|
24128
|
-
return visitNode(cbNode, node.exprName)
|
|
24131
|
+
return visitNode(cbNode, node.exprName) ||
|
|
24132
|
+
visitNodes(cbNode, cbNodes, node.typeArguments);
|
|
24129
24133
|
case 181:
|
|
24130
24134
|
return visitNodes(cbNode, cbNodes, node.members);
|
|
24131
24135
|
case 182:
|
|
@@ -26206,7 +26210,9 @@ var ts;
|
|
|
26206
26210
|
function parseTypeQuery() {
|
|
26207
26211
|
var pos = getNodePos();
|
|
26208
26212
|
parseExpected(112);
|
|
26209
|
-
|
|
26213
|
+
var entityName = parseEntityName(true, true);
|
|
26214
|
+
var typeArguments = tryParseTypeArguments();
|
|
26215
|
+
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26210
26216
|
}
|
|
26211
26217
|
function parseTypeParameter() {
|
|
26212
26218
|
var pos = getNodePos();
|
|
@@ -27763,19 +27769,28 @@ var ts;
|
|
|
27763
27769
|
expression = parsePropertyAccessExpressionRest(pos, expression, questionDotToken);
|
|
27764
27770
|
continue;
|
|
27765
27771
|
}
|
|
27766
|
-
if (!questionDotToken && token() === 53 && !scanner.hasPrecedingLineBreak()) {
|
|
27767
|
-
nextToken();
|
|
27768
|
-
expression = finishNode(factory.createNonNullExpression(expression), pos);
|
|
27769
|
-
continue;
|
|
27770
|
-
}
|
|
27771
27772
|
if ((questionDotToken || !inDecoratorContext()) && parseOptional(22)) {
|
|
27772
27773
|
expression = parseElementAccessExpressionRest(pos, expression, questionDotToken);
|
|
27773
27774
|
continue;
|
|
27774
27775
|
}
|
|
27775
27776
|
if (isTemplateStartOfTaggedTemplate()) {
|
|
27776
|
-
expression =
|
|
27777
|
+
expression = !questionDotToken && expression.kind === 227 ?
|
|
27778
|
+
parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) :
|
|
27779
|
+
parseTaggedTemplateRest(pos, expression, questionDotToken, undefined);
|
|
27777
27780
|
continue;
|
|
27778
27781
|
}
|
|
27782
|
+
if (!questionDotToken) {
|
|
27783
|
+
if (token() === 53 && !scanner.hasPrecedingLineBreak()) {
|
|
27784
|
+
nextToken();
|
|
27785
|
+
expression = finishNode(factory.createNonNullExpression(expression), pos);
|
|
27786
|
+
continue;
|
|
27787
|
+
}
|
|
27788
|
+
var typeArguments = tryParse(parseTypeArgumentsInExpression);
|
|
27789
|
+
if (typeArguments) {
|
|
27790
|
+
expression = finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos);
|
|
27791
|
+
continue;
|
|
27792
|
+
}
|
|
27793
|
+
}
|
|
27779
27794
|
return expression;
|
|
27780
27795
|
}
|
|
27781
27796
|
}
|
|
@@ -27795,27 +27810,24 @@ var ts;
|
|
|
27795
27810
|
function parseCallExpressionRest(pos, expression) {
|
|
27796
27811
|
while (true) {
|
|
27797
27812
|
expression = parseMemberExpressionRest(pos, expression, true);
|
|
27813
|
+
var typeArguments = void 0;
|
|
27798
27814
|
var questionDotToken = parseOptionalToken(28);
|
|
27799
|
-
if (
|
|
27800
|
-
|
|
27801
|
-
if (
|
|
27802
|
-
|
|
27803
|
-
expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments);
|
|
27804
|
-
continue;
|
|
27805
|
-
}
|
|
27806
|
-
var argumentList = parseArgumentList();
|
|
27807
|
-
var callExpr = questionDotToken || tryReparseOptionalChain(expression) ?
|
|
27808
|
-
factory.createCallChain(expression, questionDotToken, typeArguments, argumentList) :
|
|
27809
|
-
factory.createCallExpression(expression, typeArguments, argumentList);
|
|
27810
|
-
expression = finishNode(callExpr, pos);
|
|
27815
|
+
if (questionDotToken) {
|
|
27816
|
+
typeArguments = tryParse(parseTypeArgumentsInExpression);
|
|
27817
|
+
if (isTemplateStartOfTaggedTemplate()) {
|
|
27818
|
+
expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments);
|
|
27811
27819
|
continue;
|
|
27812
27820
|
}
|
|
27813
27821
|
}
|
|
27814
|
-
|
|
27822
|
+
if (typeArguments || token() === 20) {
|
|
27823
|
+
if (!questionDotToken && expression.kind === 227) {
|
|
27824
|
+
typeArguments = expression.typeArguments;
|
|
27825
|
+
expression = expression.expression;
|
|
27826
|
+
}
|
|
27815
27827
|
var argumentList = parseArgumentList();
|
|
27816
27828
|
var callExpr = questionDotToken || tryReparseOptionalChain(expression) ?
|
|
27817
|
-
factory.createCallChain(expression, questionDotToken,
|
|
27818
|
-
factory.createCallExpression(expression,
|
|
27829
|
+
factory.createCallChain(expression, questionDotToken, typeArguments, argumentList) :
|
|
27830
|
+
factory.createCallExpression(expression, typeArguments, argumentList);
|
|
27819
27831
|
expression = finishNode(callExpr, pos);
|
|
27820
27832
|
continue;
|
|
27821
27833
|
}
|
|
@@ -27845,16 +27857,16 @@ var ts;
|
|
|
27845
27857
|
if (!parseExpected(31)) {
|
|
27846
27858
|
return undefined;
|
|
27847
27859
|
}
|
|
27848
|
-
return typeArguments && canFollowTypeArgumentsInExpression()
|
|
27849
|
-
? typeArguments
|
|
27850
|
-
: undefined;
|
|
27860
|
+
return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined;
|
|
27851
27861
|
}
|
|
27852
27862
|
function canFollowTypeArgumentsInExpression() {
|
|
27853
27863
|
switch (token()) {
|
|
27854
27864
|
case 20:
|
|
27855
27865
|
case 14:
|
|
27856
27866
|
case 15:
|
|
27867
|
+
case 27:
|
|
27857
27868
|
case 24:
|
|
27869
|
+
case 28:
|
|
27858
27870
|
case 21:
|
|
27859
27871
|
case 23:
|
|
27860
27872
|
case 58:
|
|
@@ -27873,11 +27885,8 @@ var ts;
|
|
|
27873
27885
|
case 19:
|
|
27874
27886
|
case 1:
|
|
27875
27887
|
return true;
|
|
27876
|
-
case 27:
|
|
27877
|
-
case 18:
|
|
27878
|
-
default:
|
|
27879
|
-
return false;
|
|
27880
27888
|
}
|
|
27889
|
+
return false;
|
|
27881
27890
|
}
|
|
27882
27891
|
function parsePrimaryExpression() {
|
|
27883
27892
|
switch (token()) {
|
|
@@ -28041,26 +28050,14 @@ var ts;
|
|
|
28041
28050
|
return finishNode(factory.createMetaProperty(103, name), pos);
|
|
28042
28051
|
}
|
|
28043
28052
|
var expressionPos = getNodePos();
|
|
28044
|
-
var expression = parsePrimaryExpression();
|
|
28053
|
+
var expression = parseMemberExpressionRest(expressionPos, parsePrimaryExpression(), false);
|
|
28045
28054
|
var typeArguments;
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
if (isTemplateStartOfTaggedTemplate()) {
|
|
28050
|
-
ts.Debug.assert(!!typeArguments, "Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'");
|
|
28051
|
-
expression = parseTaggedTemplateRest(expressionPos, expression, undefined, typeArguments);
|
|
28052
|
-
typeArguments = undefined;
|
|
28053
|
-
}
|
|
28054
|
-
break;
|
|
28055
|
+
if (expression.kind === 227) {
|
|
28056
|
+
typeArguments = expression.typeArguments;
|
|
28057
|
+
expression = expression.expression;
|
|
28055
28058
|
}
|
|
28056
|
-
var
|
|
28057
|
-
|
|
28058
|
-
argumentsArray = parseArgumentList();
|
|
28059
|
-
}
|
|
28060
|
-
else if (typeArguments) {
|
|
28061
|
-
parseErrorAt(pos, scanner.getStartPos(), ts.Diagnostics.A_new_expression_with_type_arguments_must_always_be_followed_by_a_parenthesized_argument_list);
|
|
28062
|
-
}
|
|
28063
|
-
return finishNode(factory.createNewExpression(expression, typeArguments, argumentsArray), pos);
|
|
28059
|
+
var argumentList = token() === 20 ? parseArgumentList() : undefined;
|
|
28060
|
+
return finishNode(factory.createNewExpression(expression, typeArguments, argumentList), pos);
|
|
28064
28061
|
}
|
|
28065
28062
|
function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
|
|
28066
28063
|
var pos = getNodePos();
|
|
@@ -29026,6 +29023,9 @@ var ts;
|
|
|
29026
29023
|
function parseExpressionWithTypeArguments() {
|
|
29027
29024
|
var pos = getNodePos();
|
|
29028
29025
|
var expression = parseLeftHandSideExpressionOrHigher();
|
|
29026
|
+
if (expression.kind === 227) {
|
|
29027
|
+
return expression;
|
|
29028
|
+
}
|
|
29029
29029
|
var typeArguments = tryParseTypeArguments();
|
|
29030
29030
|
return finishNode(factory.createExpressionWithTypeArguments(expression, typeArguments), pos);
|
|
29031
29031
|
}
|
|
@@ -32952,7 +32952,7 @@ var ts;
|
|
|
32952
32952
|
var result = [];
|
|
32953
32953
|
result.push("{");
|
|
32954
32954
|
result.push(tab + "\"compilerOptions\": {");
|
|
32955
|
-
result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.
|
|
32955
|
+
result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file) + " */");
|
|
32956
32956
|
result.push("");
|
|
32957
32957
|
for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
|
|
32958
32958
|
var entry = entries_2[_a];
|
|
@@ -41935,7 +41935,7 @@ var ts;
|
|
|
41935
41935
|
function isEntityNameVisible(entityName, enclosingDeclaration) {
|
|
41936
41936
|
var meaning;
|
|
41937
41937
|
if (entityName.parent.kind === 180 ||
|
|
41938
|
-
ts.
|
|
41938
|
+
entityName.parent.kind === 227 && !ts.isPartOfTypeNode(entityName.parent) ||
|
|
41939
41939
|
entityName.parent.kind === 161) {
|
|
41940
41940
|
meaning = 111551 | 1048576;
|
|
41941
41941
|
}
|
|
@@ -42038,7 +42038,7 @@ var ts;
|
|
|
42038
42038
|
return flags & 814775659;
|
|
42039
42039
|
}
|
|
42040
42040
|
function isClassInstanceSide(type) {
|
|
42041
|
-
return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288) && !!(ts.getObjectFlags(type) &
|
|
42041
|
+
return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288) && !!(ts.getObjectFlags(type) & 33554432)));
|
|
42042
42042
|
}
|
|
42043
42043
|
function createNodeBuilder() {
|
|
42044
42044
|
return {
|
|
@@ -45435,7 +45435,7 @@ var ts;
|
|
|
45435
45435
|
var result = createAnonymousType(initialSize !== members_4.size ? undefined : exportedType.symbol, members_4, exportedType.callSignatures, exportedType.constructSignatures, exportedType.indexInfos);
|
|
45436
45436
|
result.objectFlags |= (ts.getObjectFlags(type) & 8192);
|
|
45437
45437
|
if (result.symbol && result.symbol.flags & 32 && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {
|
|
45438
|
-
result.objectFlags |=
|
|
45438
|
+
result.objectFlags |= 33554432;
|
|
45439
45439
|
}
|
|
45440
45440
|
return result;
|
|
45441
45441
|
}
|
|
@@ -47207,81 +47207,81 @@ var ts;
|
|
|
47207
47207
|
return ts.append(indexInfos, newInfo);
|
|
47208
47208
|
}
|
|
47209
47209
|
function resolveAnonymousTypeMembers(type) {
|
|
47210
|
-
var symbol = getMergedSymbol(type.symbol);
|
|
47211
47210
|
if (type.target) {
|
|
47212
47211
|
setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47213
|
-
var
|
|
47212
|
+
var members_6 = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, false);
|
|
47214
47213
|
var callSignatures = instantiateSignatures(getSignaturesOfType(type.target, 0), type.mapper);
|
|
47215
47214
|
var constructSignatures = instantiateSignatures(getSignaturesOfType(type.target, 1), type.mapper);
|
|
47216
|
-
var
|
|
47217
|
-
setStructuredTypeMembers(type,
|
|
47215
|
+
var indexInfos_1 = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper);
|
|
47216
|
+
setStructuredTypeMembers(type, members_6, callSignatures, constructSignatures, indexInfos_1);
|
|
47217
|
+
return;
|
|
47218
47218
|
}
|
|
47219
|
-
|
|
47219
|
+
var symbol = getMergedSymbol(type.symbol);
|
|
47220
|
+
if (symbol.flags & 2048) {
|
|
47220
47221
|
setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47221
|
-
var
|
|
47222
|
-
var callSignatures = getSignaturesOfSymbol(
|
|
47223
|
-
var constructSignatures = getSignaturesOfSymbol(
|
|
47224
|
-
var
|
|
47225
|
-
setStructuredTypeMembers(type,
|
|
47222
|
+
var members_7 = getMembersOfSymbol(symbol);
|
|
47223
|
+
var callSignatures = getSignaturesOfSymbol(members_7.get("__call"));
|
|
47224
|
+
var constructSignatures = getSignaturesOfSymbol(members_7.get("__new"));
|
|
47225
|
+
var indexInfos_2 = getIndexInfosOfSymbol(symbol);
|
|
47226
|
+
setStructuredTypeMembers(type, members_7, callSignatures, constructSignatures, indexInfos_2);
|
|
47227
|
+
return;
|
|
47226
47228
|
}
|
|
47227
|
-
|
|
47228
|
-
|
|
47229
|
-
|
|
47230
|
-
|
|
47231
|
-
|
|
47232
|
-
|
|
47233
|
-
|
|
47234
|
-
|
|
47235
|
-
|
|
47236
|
-
|
|
47237
|
-
|
|
47238
|
-
|
|
47239
|
-
members = varsOnly_1;
|
|
47240
|
-
}
|
|
47229
|
+
var members = emptySymbols;
|
|
47230
|
+
var indexInfos;
|
|
47231
|
+
if (symbol.exports) {
|
|
47232
|
+
members = getExportsOfSymbol(symbol);
|
|
47233
|
+
if (symbol === globalThisSymbol) {
|
|
47234
|
+
var varsOnly_1 = new ts.Map();
|
|
47235
|
+
members.forEach(function (p) {
|
|
47236
|
+
if (!(p.flags & 418)) {
|
|
47237
|
+
varsOnly_1.set(p.escapedName, p);
|
|
47238
|
+
}
|
|
47239
|
+
});
|
|
47240
|
+
members = varsOnly_1;
|
|
47241
47241
|
}
|
|
47242
|
-
|
|
47243
|
-
|
|
47244
|
-
|
|
47245
|
-
|
|
47246
|
-
|
|
47247
|
-
|
|
47248
|
-
|
|
47249
|
-
|
|
47250
|
-
|
|
47251
|
-
else if (baseConstructorType === anyType) {
|
|
47252
|
-
baseConstructorIndexInfo = createIndexInfo(stringType, anyType, false);
|
|
47253
|
-
}
|
|
47242
|
+
}
|
|
47243
|
+
var baseConstructorIndexInfo;
|
|
47244
|
+
setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
47245
|
+
if (symbol.flags & 32) {
|
|
47246
|
+
var classType = getDeclaredTypeOfClassOrInterface(symbol);
|
|
47247
|
+
var baseConstructorType = getBaseConstructorTypeOfClass(classType);
|
|
47248
|
+
if (baseConstructorType.flags & (524288 | 2097152 | 8650752)) {
|
|
47249
|
+
members = ts.createSymbolTable(getNamedOrIndexSignatureMembers(members));
|
|
47250
|
+
addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
|
|
47254
47251
|
}
|
|
47255
|
-
|
|
47256
|
-
|
|
47257
|
-
indexInfos = getIndexInfosOfIndexSymbol(indexSymbol);
|
|
47252
|
+
else if (baseConstructorType === anyType) {
|
|
47253
|
+
baseConstructorIndexInfo = createIndexInfo(stringType, anyType, false);
|
|
47258
47254
|
}
|
|
47259
|
-
|
|
47260
|
-
|
|
47261
|
-
|
|
47262
|
-
|
|
47263
|
-
|
|
47264
|
-
|
|
47265
|
-
|
|
47266
|
-
|
|
47255
|
+
}
|
|
47256
|
+
var indexSymbol = getIndexSymbolFromSymbolTable(members);
|
|
47257
|
+
if (indexSymbol) {
|
|
47258
|
+
indexInfos = getIndexInfosOfIndexSymbol(indexSymbol);
|
|
47259
|
+
}
|
|
47260
|
+
else {
|
|
47261
|
+
if (baseConstructorIndexInfo) {
|
|
47262
|
+
indexInfos = ts.append(indexInfos, baseConstructorIndexInfo);
|
|
47267
47263
|
}
|
|
47268
|
-
|
|
47269
|
-
|
|
47270
|
-
|
|
47264
|
+
if (symbol.flags & 384 && (getDeclaredTypeOfSymbol(symbol).flags & 32 ||
|
|
47265
|
+
ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296); }))) {
|
|
47266
|
+
indexInfos = ts.append(indexInfos, enumNumberIndexInfo);
|
|
47271
47267
|
}
|
|
47272
|
-
|
|
47273
|
-
|
|
47274
|
-
|
|
47275
|
-
|
|
47276
|
-
|
|
47277
|
-
|
|
47278
|
-
|
|
47279
|
-
|
|
47280
|
-
|
|
47281
|
-
|
|
47282
|
-
|
|
47283
|
-
|
|
47268
|
+
}
|
|
47269
|
+
setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos || ts.emptyArray);
|
|
47270
|
+
if (symbol.flags & (16 | 8192)) {
|
|
47271
|
+
type.callSignatures = getSignaturesOfSymbol(symbol);
|
|
47272
|
+
}
|
|
47273
|
+
if (symbol.flags & 32) {
|
|
47274
|
+
var classType_1 = getDeclaredTypeOfClassOrInterface(symbol);
|
|
47275
|
+
var constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor")) : ts.emptyArray;
|
|
47276
|
+
if (symbol.flags & 16) {
|
|
47277
|
+
constructSignatures = ts.addRange(constructSignatures.slice(), ts.mapDefined(type.callSignatures, function (sig) { return isJSConstructor(sig.declaration) ?
|
|
47278
|
+
createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, classType_1, undefined, sig.minArgumentCount, sig.flags & 39) :
|
|
47279
|
+
undefined; }));
|
|
47280
|
+
}
|
|
47281
|
+
if (!constructSignatures.length) {
|
|
47282
|
+
constructSignatures = getDefaultConstructSignatures(classType_1);
|
|
47284
47283
|
}
|
|
47284
|
+
type.constructSignatures = constructSignatures;
|
|
47285
47285
|
}
|
|
47286
47286
|
}
|
|
47287
47287
|
function replaceIndexedAccess(instantiable, type, replacement) {
|
|
@@ -48141,8 +48141,8 @@ var ts;
|
|
|
48141
48141
|
var stringIndexInfo;
|
|
48142
48142
|
var applicableInfo;
|
|
48143
48143
|
var applicableInfos;
|
|
48144
|
-
for (var _i = 0,
|
|
48145
|
-
var info =
|
|
48144
|
+
for (var _i = 0, indexInfos_3 = indexInfos; _i < indexInfos_3.length; _i++) {
|
|
48145
|
+
var info = indexInfos_3[_i];
|
|
48146
48146
|
if (info.keyType === stringType) {
|
|
48147
48147
|
stringIndexInfo = info;
|
|
48148
48148
|
}
|
|
@@ -48660,14 +48660,14 @@ var ts;
|
|
|
48660
48660
|
}
|
|
48661
48661
|
function getIndexInfosOfIndexSymbol(indexSymbol) {
|
|
48662
48662
|
if (indexSymbol.declarations) {
|
|
48663
|
-
var
|
|
48663
|
+
var indexInfos_4 = [];
|
|
48664
48664
|
var _loop_14 = function (declaration) {
|
|
48665
48665
|
if (declaration.parameters.length === 1) {
|
|
48666
48666
|
var parameter = declaration.parameters[0];
|
|
48667
48667
|
if (parameter.type) {
|
|
48668
48668
|
forEachType(getTypeFromTypeNode(parameter.type), function (keyType) {
|
|
48669
|
-
if (isValidIndexKeyType(keyType) && !findIndexInfo(
|
|
48670
|
-
|
|
48669
|
+
if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos_4, keyType)) {
|
|
48670
|
+
indexInfos_4.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, ts.hasEffectiveModifier(declaration, 64), declaration));
|
|
48671
48671
|
}
|
|
48672
48672
|
});
|
|
48673
48673
|
}
|
|
@@ -48677,7 +48677,7 @@ var ts;
|
|
|
48677
48677
|
var declaration = _a[_i];
|
|
48678
48678
|
_loop_14(declaration);
|
|
48679
48679
|
}
|
|
48680
|
-
return
|
|
48680
|
+
return indexInfos_4;
|
|
48681
48681
|
}
|
|
48682
48682
|
return ts.emptyArray;
|
|
48683
48683
|
}
|
|
@@ -49162,7 +49162,7 @@ var ts;
|
|
|
49162
49162
|
function getTypeFromTypeQueryNode(node) {
|
|
49163
49163
|
var links = getNodeLinks(node);
|
|
49164
49164
|
if (!links.resolvedType) {
|
|
49165
|
-
var type =
|
|
49165
|
+
var type = checkExpressionWithTypeArguments(node);
|
|
49166
49166
|
links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(type));
|
|
49167
49167
|
}
|
|
49168
49168
|
return links.resolvedType;
|
|
@@ -51588,7 +51588,9 @@ var ts;
|
|
|
51588
51588
|
return result;
|
|
51589
51589
|
}
|
|
51590
51590
|
function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) {
|
|
51591
|
-
var declaration = type.objectFlags & 4 ? type.node :
|
|
51591
|
+
var declaration = type.objectFlags & 4 ? type.node :
|
|
51592
|
+
type.objectFlags & 16777216 ? type.node :
|
|
51593
|
+
type.symbol.declarations[0];
|
|
51592
51594
|
var links = getNodeLinks(declaration);
|
|
51593
51595
|
var target = type.objectFlags & 4 ? links.resolvedType :
|
|
51594
51596
|
type.objectFlags & 64 ? type.target : type;
|
|
@@ -51600,8 +51602,8 @@ var ts;
|
|
|
51600
51602
|
outerTypeParameters = ts.addRange(outerTypeParameters, templateTagParameters);
|
|
51601
51603
|
}
|
|
51602
51604
|
typeParameters = outerTypeParameters || ts.emptyArray;
|
|
51603
|
-
var allDeclarations_1 = type.objectFlags & 4 ? [declaration] : type.symbol.declarations;
|
|
51604
|
-
typeParameters = (target.objectFlags & 4 || target.symbol.flags & 8192 || target.symbol.flags & 2048) && !target.aliasTypeArguments ?
|
|
51605
|
+
var allDeclarations_1 = type.objectFlags & (4 | 16777216) ? [declaration] : type.symbol.declarations;
|
|
51606
|
+
typeParameters = (target.objectFlags & (4 | 16777216) || target.symbol.flags & 8192 || target.symbol.flags & 2048) && !target.aliasTypeArguments ?
|
|
51605
51607
|
ts.filter(typeParameters, function (tp) { return ts.some(allDeclarations_1, function (d) { return isTypeParameterPossiblyReferenced(tp, d); }); }) :
|
|
51606
51608
|
typeParameters;
|
|
51607
51609
|
links.outerTypeParameters = typeParameters;
|
|
@@ -51750,6 +51752,9 @@ var ts;
|
|
|
51750
51752
|
mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper);
|
|
51751
51753
|
freshTypeParameter.mapper = mapper;
|
|
51752
51754
|
}
|
|
51755
|
+
if (type.objectFlags & 16777216) {
|
|
51756
|
+
result.node = type.node;
|
|
51757
|
+
}
|
|
51753
51758
|
result.target = type;
|
|
51754
51759
|
result.mapper = mapper;
|
|
51755
51760
|
result.aliasSymbol = aliasSymbol || type.aliasSymbol;
|
|
@@ -52440,9 +52445,6 @@ var ts;
|
|
|
52440
52445
|
if (sourceRestType || targetRestType) {
|
|
52441
52446
|
void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers);
|
|
52442
52447
|
}
|
|
52443
|
-
if (sourceRestType && targetRestType && sourceCount !== targetCount) {
|
|
52444
|
-
return 0;
|
|
52445
|
-
}
|
|
52446
52448
|
var kind = target.declaration ? target.declaration.kind : 0;
|
|
52447
52449
|
var strictVariance = !(checkMode & 3) && strictFunctionTypes && kind !== 168 &&
|
|
52448
52450
|
kind !== 167 && kind !== 170;
|
|
@@ -54502,8 +54504,8 @@ var ts;
|
|
|
54502
54504
|
var indexInfos = getIndexInfosOfType(target);
|
|
54503
54505
|
var targetHasStringIndex = ts.some(indexInfos, function (info) { return info.keyType === stringType; });
|
|
54504
54506
|
var result = -1;
|
|
54505
|
-
for (var _i = 0,
|
|
54506
|
-
var targetInfo =
|
|
54507
|
+
for (var _i = 0, indexInfos_5 = indexInfos; _i < indexInfos_5.length; _i++) {
|
|
54508
|
+
var targetInfo = indexInfos_5[_i];
|
|
54507
54509
|
var related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 ? -1 :
|
|
54508
54510
|
isGenericMappedType(source) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source), targetInfo.type, 3, reportErrors) :
|
|
54509
54511
|
typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState);
|
|
@@ -55012,10 +55014,10 @@ var ts;
|
|
|
55012
55014
|
if (!(ts.getObjectFlags(type) & 4) || !(ts.getObjectFlags(type.target) & 3)) {
|
|
55013
55015
|
return undefined;
|
|
55014
55016
|
}
|
|
55015
|
-
if (ts.getObjectFlags(type) &
|
|
55016
|
-
return ts.getObjectFlags(type) &
|
|
55017
|
+
if (ts.getObjectFlags(type) & 67108864) {
|
|
55018
|
+
return ts.getObjectFlags(type) & 134217728 ? type.cachedEquivalentBaseType : undefined;
|
|
55017
55019
|
}
|
|
55018
|
-
type.objectFlags |=
|
|
55020
|
+
type.objectFlags |= 67108864;
|
|
55019
55021
|
var target = type.target;
|
|
55020
55022
|
if (ts.getObjectFlags(target) & 1) {
|
|
55021
55023
|
var baseTypeNode = getBaseTypeNodeOfClass(target);
|
|
@@ -55034,7 +55036,7 @@ var ts;
|
|
|
55034
55036
|
if (ts.length(getTypeArguments(type)) > ts.length(target.typeParameters)) {
|
|
55035
55037
|
instantiatedBase = getTypeWithThisArgument(instantiatedBase, ts.last(getTypeArguments(type)));
|
|
55036
55038
|
}
|
|
55037
|
-
type.objectFlags |=
|
|
55039
|
+
type.objectFlags |= 134217728;
|
|
55038
55040
|
return type.cachedEquivalentBaseType = instantiatedBase;
|
|
55039
55041
|
}
|
|
55040
55042
|
function isEmptyLiteralType(type) {
|
|
@@ -55631,7 +55633,7 @@ var ts;
|
|
|
55631
55633
|
var result = !!(type.flags & 465829888 ||
|
|
55632
55634
|
type.flags & 524288 && !isNonGenericTopLevelType(type) && (objectFlags & 4 && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) ||
|
|
55633
55635
|
objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 32 | 2048 | 4096) && type.symbol.declarations ||
|
|
55634
|
-
objectFlags & (32 | 1024 | 8388608)) ||
|
|
55636
|
+
objectFlags & (32 | 1024 | 8388608 | 16777216)) ||
|
|
55635
55637
|
type.flags & 3145728 && !(type.flags & 1024) && !isNonGenericTopLevelType(type) && ts.some(type.types, couldContainTypeVariables));
|
|
55636
55638
|
if (type.flags & 3899393) {
|
|
55637
55639
|
type.objectFlags |= 1048576 | (result ? 2097152 : 0);
|
|
@@ -56398,8 +56400,8 @@ var ts;
|
|
|
56398
56400
|
var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32) ? 8 : 0;
|
|
56399
56401
|
var indexInfos = getIndexInfosOfType(target);
|
|
56400
56402
|
if (isObjectTypeWithInferableIndex(source)) {
|
|
56401
|
-
for (var _i = 0,
|
|
56402
|
-
var targetInfo =
|
|
56403
|
+
for (var _i = 0, indexInfos_6 = indexInfos; _i < indexInfos_6.length; _i++) {
|
|
56404
|
+
var targetInfo = indexInfos_6[_i];
|
|
56403
56405
|
var propTypes = [];
|
|
56404
56406
|
for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
|
|
56405
56407
|
var prop = _b[_a];
|
|
@@ -56419,8 +56421,8 @@ var ts;
|
|
|
56419
56421
|
}
|
|
56420
56422
|
}
|
|
56421
56423
|
}
|
|
56422
|
-
for (var _e = 0,
|
|
56423
|
-
var targetInfo =
|
|
56424
|
+
for (var _e = 0, indexInfos_7 = indexInfos; _e < indexInfos_7.length; _e++) {
|
|
56425
|
+
var targetInfo = indexInfos_7[_e];
|
|
56424
56426
|
var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType);
|
|
56425
56427
|
if (sourceInfo) {
|
|
56426
56428
|
inferWithPriority(sourceInfo.type, targetInfo.type, priority);
|
|
@@ -58529,7 +58531,7 @@ var ts;
|
|
|
58529
58531
|
var substituteConstraints = !(checkMode && checkMode & 2) &&
|
|
58530
58532
|
someType(type, isGenericTypeWithUnionConstraint) &&
|
|
58531
58533
|
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
|
|
58532
|
-
return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888
|
|
58534
|
+
return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 ? getBaseConstraintOrType(t) : t; }) : type;
|
|
58533
58535
|
}
|
|
58534
58536
|
function isExportOrExportExpression(location) {
|
|
58535
58537
|
return !!ts.findAncestor(location, function (n) {
|
|
@@ -63380,6 +63382,72 @@ var ts;
|
|
|
63380
63382
|
return node.flags & 32 ? checkNonNullChain(node) :
|
|
63381
63383
|
getNonNullableType(checkExpression(node.expression));
|
|
63382
63384
|
}
|
|
63385
|
+
function checkExpressionWithTypeArguments(node) {
|
|
63386
|
+
checkGrammarExpressionWithTypeArguments(node);
|
|
63387
|
+
var exprType = node.kind === 227 ? checkExpression(node.expression) :
|
|
63388
|
+
ts.isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) :
|
|
63389
|
+
checkExpression(node.exprName);
|
|
63390
|
+
var typeArguments = node.typeArguments;
|
|
63391
|
+
if (exprType === silentNeverType || isErrorType(exprType) || !ts.some(typeArguments)) {
|
|
63392
|
+
return exprType;
|
|
63393
|
+
}
|
|
63394
|
+
var hasSomeApplicableSignature = false;
|
|
63395
|
+
var nonApplicableType;
|
|
63396
|
+
var result = getInstantiatedType(exprType);
|
|
63397
|
+
var errorType = hasSomeApplicableSignature ? nonApplicableType : exprType;
|
|
63398
|
+
if (errorType) {
|
|
63399
|
+
diagnostics.add(ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, typeToString(errorType)));
|
|
63400
|
+
}
|
|
63401
|
+
return result;
|
|
63402
|
+
function getInstantiatedType(type) {
|
|
63403
|
+
var hasSignatures = false;
|
|
63404
|
+
var hasApplicableSignature = false;
|
|
63405
|
+
var result = getInstantiatedTypePart(type);
|
|
63406
|
+
hasSomeApplicableSignature || (hasSomeApplicableSignature = hasApplicableSignature);
|
|
63407
|
+
if (hasSignatures && !hasApplicableSignature) {
|
|
63408
|
+
nonApplicableType !== null && nonApplicableType !== void 0 ? nonApplicableType : (nonApplicableType = type);
|
|
63409
|
+
}
|
|
63410
|
+
return result;
|
|
63411
|
+
function getInstantiatedTypePart(type) {
|
|
63412
|
+
if (type.flags & 524288) {
|
|
63413
|
+
var resolved = resolveStructuredTypeMembers(type);
|
|
63414
|
+
var callSignatures = getInstantiatedSignatures(resolved.callSignatures);
|
|
63415
|
+
var constructSignatures = getInstantiatedSignatures(resolved.constructSignatures);
|
|
63416
|
+
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
63417
|
+
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
63418
|
+
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
63419
|
+
var result_11 = createAnonymousType(undefined, resolved.members, callSignatures, constructSignatures, resolved.indexInfos);
|
|
63420
|
+
result_11.objectFlags |= 16777216;
|
|
63421
|
+
result_11.node = node;
|
|
63422
|
+
return result_11;
|
|
63423
|
+
}
|
|
63424
|
+
}
|
|
63425
|
+
else if (type.flags & 58982400) {
|
|
63426
|
+
var constraint = getBaseConstraintOfType(type);
|
|
63427
|
+
if (constraint) {
|
|
63428
|
+
var instantiated = getInstantiatedTypePart(constraint);
|
|
63429
|
+
if (instantiated !== constraint) {
|
|
63430
|
+
return instantiated;
|
|
63431
|
+
}
|
|
63432
|
+
}
|
|
63433
|
+
}
|
|
63434
|
+
else if (type.flags & 1048576) {
|
|
63435
|
+
return mapType(type, getInstantiatedType);
|
|
63436
|
+
}
|
|
63437
|
+
else if (type.flags & 2097152) {
|
|
63438
|
+
return getIntersectionType(ts.sameMap(type.types, getInstantiatedTypePart));
|
|
63439
|
+
}
|
|
63440
|
+
return type;
|
|
63441
|
+
}
|
|
63442
|
+
}
|
|
63443
|
+
function getInstantiatedSignatures(signatures) {
|
|
63444
|
+
var applicableSignatures = ts.filter(signatures, function (sig) { return !!sig.typeParameters && hasCorrectTypeArgumentArity(sig, typeArguments); });
|
|
63445
|
+
return ts.sameMap(applicableSignatures, function (sig) {
|
|
63446
|
+
var typeArgumentTypes = checkTypeArguments(sig, typeArguments, true);
|
|
63447
|
+
return typeArgumentTypes ? getSignatureInstantiation(sig, typeArgumentTypes, ts.isInJSFile(sig.declaration)) : sig;
|
|
63448
|
+
});
|
|
63449
|
+
}
|
|
63450
|
+
}
|
|
63383
63451
|
function checkMetaProperty(node) {
|
|
63384
63452
|
checkGrammarMetaProperty(node);
|
|
63385
63453
|
if (node.keywordToken === 103) {
|
|
@@ -64698,7 +64766,7 @@ var ts;
|
|
|
64698
64766
|
if (operator === 55 || operator === 56 || operator === 60) {
|
|
64699
64767
|
if (operator === 55) {
|
|
64700
64768
|
var parent = ts.walkUpParenthesizedExpressions(node.parent);
|
|
64701
|
-
checkTestingKnownTruthyCallableOrAwaitableType(node.left,
|
|
64769
|
+
checkTestingKnownTruthyCallableOrAwaitableType(node.left, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
|
|
64702
64770
|
}
|
|
64703
64771
|
checkTruthinessOfType(leftType, node.left);
|
|
64704
64772
|
}
|
|
@@ -65161,8 +65229,8 @@ var ts;
|
|
|
65161
65229
|
return type;
|
|
65162
65230
|
}
|
|
65163
65231
|
function checkConditionalExpression(node, checkMode) {
|
|
65164
|
-
|
|
65165
|
-
checkTestingKnownTruthyCallableOrAwaitableType(node.condition,
|
|
65232
|
+
checkTruthinessExpression(node.condition);
|
|
65233
|
+
checkTestingKnownTruthyCallableOrAwaitableType(node.condition, node.whenTrue);
|
|
65166
65234
|
var type1 = checkExpression(node.whenTrue, checkMode);
|
|
65167
65235
|
var type2 = checkExpression(node.whenFalse, checkMode);
|
|
65168
65236
|
return getUnionType([type1, type2], 2);
|
|
@@ -65617,6 +65685,8 @@ var ts;
|
|
|
65617
65685
|
return checkAssertion(node);
|
|
65618
65686
|
case 229:
|
|
65619
65687
|
return checkNonNullAssertion(node);
|
|
65688
|
+
case 227:
|
|
65689
|
+
return checkExpressionWithTypeArguments(node);
|
|
65620
65690
|
case 230:
|
|
65621
65691
|
return checkMetaProperty(node);
|
|
65622
65692
|
case 214:
|
|
@@ -66699,12 +66769,12 @@ var ts;
|
|
|
66699
66769
|
case 264:
|
|
66700
66770
|
case 267:
|
|
66701
66771
|
case 266:
|
|
66702
|
-
var
|
|
66772
|
+
var result_12 = 0;
|
|
66703
66773
|
var target = resolveAlias(getSymbolOfNode(d));
|
|
66704
66774
|
ts.forEach(target.declarations, function (d) {
|
|
66705
|
-
|
|
66775
|
+
result_12 |= getDeclarationSpaces(d);
|
|
66706
66776
|
});
|
|
66707
|
-
return
|
|
66777
|
+
return result_12;
|
|
66708
66778
|
case 253:
|
|
66709
66779
|
case 202:
|
|
66710
66780
|
case 255:
|
|
@@ -67831,44 +67901,53 @@ var ts;
|
|
|
67831
67901
|
}
|
|
67832
67902
|
function checkIfStatement(node) {
|
|
67833
67903
|
checkGrammarStatementInAmbientContext(node);
|
|
67834
|
-
|
|
67835
|
-
checkTestingKnownTruthyCallableOrAwaitableType(node.expression,
|
|
67904
|
+
checkTruthinessExpression(node.expression);
|
|
67905
|
+
checkTestingKnownTruthyCallableOrAwaitableType(node.expression, node.thenStatement);
|
|
67836
67906
|
checkSourceElement(node.thenStatement);
|
|
67837
67907
|
if (node.thenStatement.kind === 235) {
|
|
67838
67908
|
error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
|
|
67839
67909
|
}
|
|
67840
67910
|
checkSourceElement(node.elseStatement);
|
|
67841
67911
|
}
|
|
67842
|
-
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr,
|
|
67912
|
+
function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, body) {
|
|
67843
67913
|
if (!strictNullChecks)
|
|
67844
67914
|
return;
|
|
67845
|
-
|
|
67846
|
-
|
|
67847
|
-
|
|
67848
|
-
|
|
67849
|
-
|
|
67850
|
-
|
|
67851
|
-
|
|
67852
|
-
|
|
67853
|
-
|
|
67854
|
-
|
|
67855
|
-
|
|
67856
|
-
|
|
67857
|
-
|
|
67858
|
-
|
|
67859
|
-
|
|
67860
|
-
|
|
67861
|
-
|
|
67862
|
-
|
|
67863
|
-
}
|
|
67864
|
-
var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
|
|
67865
|
-
|| testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
|
|
67866
|
-
if (!isUsed) {
|
|
67867
|
-
if (isPromise) {
|
|
67868
|
-
errorAndMaybeSuggestAwait(location, true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
|
|
67915
|
+
helper(condExpr, body);
|
|
67916
|
+
while (ts.isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56) {
|
|
67917
|
+
condExpr = condExpr.left;
|
|
67918
|
+
helper(condExpr, body);
|
|
67919
|
+
}
|
|
67920
|
+
function helper(condExpr, body) {
|
|
67921
|
+
var location = ts.isBinaryExpression(condExpr) &&
|
|
67922
|
+
(condExpr.operatorToken.kind === 56 || condExpr.operatorToken.kind === 55)
|
|
67923
|
+
? condExpr.right
|
|
67924
|
+
: condExpr;
|
|
67925
|
+
var type = checkTruthinessExpression(location);
|
|
67926
|
+
var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
|
|
67927
|
+
if (getFalsyFlags(type) || isPropertyExpressionCast)
|
|
67928
|
+
return;
|
|
67929
|
+
var callSignatures = getSignaturesOfType(type, 0);
|
|
67930
|
+
var isPromise = !!getAwaitedTypeOfPromise(type);
|
|
67931
|
+
if (callSignatures.length === 0 && !isPromise) {
|
|
67932
|
+
return;
|
|
67869
67933
|
}
|
|
67870
|
-
|
|
67871
|
-
|
|
67934
|
+
var testedNode = ts.isIdentifier(location) ? location
|
|
67935
|
+
: ts.isPropertyAccessExpression(location) ? location.name
|
|
67936
|
+
: ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
|
|
67937
|
+
: undefined;
|
|
67938
|
+
var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
|
|
67939
|
+
if (!testedSymbol && !isPromise) {
|
|
67940
|
+
return;
|
|
67941
|
+
}
|
|
67942
|
+
var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
|
|
67943
|
+
|| testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
|
|
67944
|
+
if (!isUsed) {
|
|
67945
|
+
if (isPromise) {
|
|
67946
|
+
errorAndMaybeSuggestAwait(location, true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
|
|
67947
|
+
}
|
|
67948
|
+
else {
|
|
67949
|
+
error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
|
|
67950
|
+
}
|
|
67872
67951
|
}
|
|
67873
67952
|
}
|
|
67874
67953
|
}
|
|
@@ -68701,8 +68780,8 @@ var ts;
|
|
|
68701
68780
|
}
|
|
68702
68781
|
}
|
|
68703
68782
|
if (indexInfos.length > 1) {
|
|
68704
|
-
for (var _d = 0,
|
|
68705
|
-
var info =
|
|
68783
|
+
for (var _d = 0, indexInfos_8 = indexInfos; _d < indexInfos_8.length; _d++) {
|
|
68784
|
+
var info = indexInfos_8[_d];
|
|
68706
68785
|
checkIndexConstraintForIndexSignature(type, info);
|
|
68707
68786
|
}
|
|
68708
68787
|
}
|
|
@@ -68725,8 +68804,8 @@ var ts;
|
|
|
68725
68804
|
error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
|
|
68726
68805
|
}
|
|
68727
68806
|
};
|
|
68728
|
-
for (var _i = 0,
|
|
68729
|
-
var info =
|
|
68807
|
+
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
68808
|
+
var info = indexInfos_9[_i];
|
|
68730
68809
|
_loop_27(info);
|
|
68731
68810
|
}
|
|
68732
68811
|
}
|
|
@@ -68745,8 +68824,8 @@ var ts;
|
|
|
68745
68824
|
error(errorNode, ts.Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type));
|
|
68746
68825
|
}
|
|
68747
68826
|
};
|
|
68748
|
-
for (var _i = 0,
|
|
68749
|
-
var info =
|
|
68827
|
+
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
68828
|
+
var info = indexInfos_10[_i];
|
|
68750
68829
|
_loop_28(info);
|
|
68751
68830
|
}
|
|
68752
68831
|
}
|
|
@@ -68790,9 +68869,9 @@ var ts;
|
|
|
68790
68869
|
var containsArguments = containsArgumentsReference(node);
|
|
68791
68870
|
if (containsArguments) {
|
|
68792
68871
|
var lastJSDocParam = ts.lastOrUndefined(jsdocParameters);
|
|
68793
|
-
if (lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
|
|
68872
|
+
if (isJs && lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
|
|
68794
68873
|
lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
|
|
68795
|
-
|
|
68874
|
+
error(lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
|
|
68796
68875
|
}
|
|
68797
68876
|
}
|
|
68798
68877
|
else {
|
|
@@ -68802,7 +68881,9 @@ var ts;
|
|
|
68802
68881
|
return;
|
|
68803
68882
|
}
|
|
68804
68883
|
if (ts.isQualifiedName(name)) {
|
|
68805
|
-
|
|
68884
|
+
if (isJs) {
|
|
68885
|
+
error(name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
|
|
68886
|
+
}
|
|
68806
68887
|
}
|
|
68807
68888
|
else {
|
|
68808
68889
|
errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
|
|
@@ -70236,10 +70317,10 @@ var ts;
|
|
|
70236
70317
|
if (id === "__export") {
|
|
70237
70318
|
return;
|
|
70238
70319
|
}
|
|
70239
|
-
if (flags & (1920 |
|
|
70320
|
+
if (flags & (1920 | 384)) {
|
|
70240
70321
|
return;
|
|
70241
70322
|
}
|
|
70242
|
-
var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverloadAndNotAccessor);
|
|
70323
|
+
var exportedDeclarationsCount = ts.countWhere(declarations, ts.and(isNotOverloadAndNotAccessor, ts.not(ts.isInterfaceDeclaration)));
|
|
70243
70324
|
if (flags & 524288 && exportedDeclarationsCount <= 2) {
|
|
70244
70325
|
return;
|
|
70245
70326
|
}
|
|
@@ -73840,7 +73921,7 @@ var ts;
|
|
|
73840
73921
|
return factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
73841
73922
|
case 180:
|
|
73842
73923
|
ts.Debug.type(node);
|
|
73843
|
-
return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName));
|
|
73924
|
+
return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
73844
73925
|
case 181:
|
|
73845
73926
|
ts.Debug.type(node);
|
|
73846
73927
|
return factory.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
@@ -76059,8 +76140,8 @@ var ts;
|
|
|
76059
76140
|
function generateClassElementDecorationExpressions(node, isStatic) {
|
|
76060
76141
|
var members = getDecoratedClassElements(node, isStatic);
|
|
76061
76142
|
var expressions;
|
|
76062
|
-
for (var _i = 0,
|
|
76063
|
-
var member =
|
|
76143
|
+
for (var _i = 0, members_8 = members; _i < members_8.length; _i++) {
|
|
76144
|
+
var member = members_8[_i];
|
|
76064
76145
|
var expression = generateClassElementDecorationExpression(node, member);
|
|
76065
76146
|
if (expression) {
|
|
76066
76147
|
if (!expressions) {
|
|
@@ -80197,8 +80278,8 @@ var ts;
|
|
|
80197
80278
|
function convertJsxChildrenToChildrenPropAssignment(children) {
|
|
80198
80279
|
var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
|
|
80199
80280
|
if (ts.length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) {
|
|
80200
|
-
var
|
|
80201
|
-
return
|
|
80281
|
+
var result_13 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
|
|
80282
|
+
return result_13 && factory.createPropertyAssignment("children", result_13);
|
|
80202
80283
|
}
|
|
80203
80284
|
var result = ts.mapDefined(children, transformJsxChildToExpression);
|
|
80204
80285
|
return ts.length(result) ? factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) : undefined;
|
|
@@ -90058,6 +90139,8 @@ var ts;
|
|
|
90058
90139
|
return emitAsExpression(node);
|
|
90059
90140
|
case 229:
|
|
90060
90141
|
return emitNonNullExpression(node);
|
|
90142
|
+
case 227:
|
|
90143
|
+
return emitExpressionWithTypeArguments(node);
|
|
90061
90144
|
case 230:
|
|
90062
90145
|
return emitMetaProperty(node);
|
|
90063
90146
|
case 231:
|
|
@@ -90451,6 +90534,7 @@ var ts;
|
|
|
90451
90534
|
writeKeyword("typeof");
|
|
90452
90535
|
writeSpace();
|
|
90453
90536
|
emit(node.exprName);
|
|
90537
|
+
emitTypeArguments(node, node.typeArguments);
|
|
90454
90538
|
}
|
|
90455
90539
|
function emitTypeLiteral(node) {
|
|
90456
90540
|
writePunctuation("{");
|
|
@@ -94924,15 +95008,15 @@ var ts;
|
|
|
94924
95008
|
}
|
|
94925
95009
|
var oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
|
|
94926
95010
|
if (oldSourceFile !== file && file.resolvedModules) {
|
|
94927
|
-
var
|
|
95011
|
+
var result_14 = [];
|
|
94928
95012
|
var i = 0;
|
|
94929
95013
|
for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
|
|
94930
95014
|
var moduleName = moduleNames_1[_i];
|
|
94931
95015
|
var resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
|
|
94932
95016
|
i++;
|
|
94933
|
-
|
|
95017
|
+
result_14.push(resolvedModule);
|
|
94934
95018
|
}
|
|
94935
|
-
return
|
|
95019
|
+
return result_14;
|
|
94936
95020
|
}
|
|
94937
95021
|
var unknownModuleNames;
|
|
94938
95022
|
var result;
|
|
@@ -99302,9 +99386,9 @@ var ts;
|
|
|
99302
99386
|
var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
|
|
99303
99387
|
var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
|
|
99304
99388
|
if (!preferSymlinks) {
|
|
99305
|
-
var
|
|
99306
|
-
if (
|
|
99307
|
-
return
|
|
99389
|
+
var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
|
|
99390
|
+
if (result_15)
|
|
99391
|
+
return result_15;
|
|
99308
99392
|
}
|
|
99309
99393
|
var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
|
|
99310
99394
|
var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
|
|
@@ -99323,10 +99407,10 @@ var ts;
|
|
|
99323
99407
|
for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
|
|
99324
99408
|
var symlinkDirectory = symlinkDirectories_1[_i];
|
|
99325
99409
|
var option = ts.resolvePath(symlinkDirectory, relative);
|
|
99326
|
-
var
|
|
99410
|
+
var result_16 = cb(option, target === referenceRedirect);
|
|
99327
99411
|
shouldFilterIgnoredPaths = true;
|
|
99328
|
-
if (
|
|
99329
|
-
return
|
|
99412
|
+
if (result_16)
|
|
99413
|
+
return result_16;
|
|
99330
99414
|
}
|
|
99331
99415
|
});
|
|
99332
99416
|
});
|
|
@@ -102707,7 +102791,7 @@ var ts;
|
|
|
102707
102791
|
example(["tsc --noEmit", "tsc --target esnext"], ts.Diagnostics.Compiles_the_current_project_with_additional_settings);
|
|
102708
102792
|
var cliCommands = simpleOptions.filter(function (opt) { return opt.isCommandLineOnly || opt.category === ts.Diagnostics.Command_line_Options; });
|
|
102709
102793
|
var configOpts = simpleOptions.filter(function (opt) { return !ts.contains(cliCommands, opt); });
|
|
102710
|
-
output = __spreadArray(__spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMAND_LINE_FLAGS), cliCommands, false, undefined, undefined), true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMON_COMPILER_OPTIONS), configOpts, false, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/
|
|
102794
|
+
output = __spreadArray(__spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMAND_LINE_FLAGS), cliCommands, false, undefined, undefined), true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMON_COMPILER_OPTIONS), configOpts, false, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")), true);
|
|
102711
102795
|
for (var _i = 0, output_1 = output; _i < output_1.length; _i++) {
|
|
102712
102796
|
var line = output_1[_i];
|
|
102713
102797
|
sys.write(line);
|
|
@@ -102723,7 +102807,7 @@ var ts;
|
|
|
102723
102807
|
}
|
|
102724
102808
|
function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
|
|
102725
102809
|
var output = __spreadArray([], getHeader(sys, ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler) + " - " + ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version)), true);
|
|
102726
|
-
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.ALL_COMPILER_OPTIONS), compilerOptions, true, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/
|
|
102810
|
+
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.ALL_COMPILER_OPTIONS), compilerOptions, true, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc")), true);
|
|
102727
102811
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.WATCH_OPTIONS), watchOptions, false, ts.getDiagnosticText(ts.Diagnostics.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon)), true);
|
|
102728
102812
|
output = __spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.BUILD_OPTIONS), buildOptions, false, ts.formatMessage(undefined, ts.Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds")), true);
|
|
102729
102813
|
for (var _i = 0, output_2 = output; _i < output_2.length; _i++) {
|
|
@@ -103172,7 +103256,7 @@ var ts;
|
|
|
103172
103256
|
sys.writeFile(file, ts.generateTSConfig(options, fileNames, sys.newLine));
|
|
103173
103257
|
var output = __spreadArray([sys.newLine], getHeader(sys, "Created a new tsconfig.json with:"), true);
|
|
103174
103258
|
output.push(ts.getCompilerOptionsDiffValue(options, sys.newLine) + sys.newLine + sys.newLine);
|
|
103175
|
-
output.push("You can learn more at https://aka.ms/tsconfig
|
|
103259
|
+
output.push("You can learn more at https://aka.ms/tsconfig" + sys.newLine);
|
|
103176
103260
|
for (var _i = 0, output_4 = output; _i < output_4.length; _i++) {
|
|
103177
103261
|
var line = output_4[_i];
|
|
103178
103262
|
sys.write(line);
|