@typescript-deploys/pr-build 4.7.0-pr-48861-7 → 4.7.0-pr-48861-16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +14 -6
- package/lib/tsserver.js +15 -6
- package/lib/tsserverlibrary.js +15 -6
- package/lib/typescript.js +15 -6
- package/lib/typescriptServices.js +15 -6
- package/lib/typingsInstaller.js +14 -6
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -6057,6 +6057,7 @@ var ts;
|
|
|
6057
6057
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
6058
6058
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
6059
6059
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
6060
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
6060
6061
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
6061
6062
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
6062
6063
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -30687,7 +30688,8 @@ var ts;
|
|
|
30687
30688
|
if (!comment) {
|
|
30688
30689
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
30689
30690
|
}
|
|
30690
|
-
|
|
30691
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
30692
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
30691
30693
|
}
|
|
30692
30694
|
function escapedTextsEqual(a, b) {
|
|
30693
30695
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -54551,17 +54553,17 @@ var ts;
|
|
|
54551
54553
|
if (sourceFlags & 8650752) {
|
|
54552
54554
|
if (!(sourceFlags & 8388608 && targetFlags & 8388608)) {
|
|
54553
54555
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
54554
|
-
if (!strictNullChecks && (!
|
|
54556
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 && constraint.flags & 1))) {
|
|
54555
54557
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
|
|
54556
54558
|
resetErrorInfo(saveErrorInfo);
|
|
54557
54559
|
return result;
|
|
54558
54560
|
}
|
|
54559
54561
|
}
|
|
54560
|
-
|
|
54562
|
+
if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
|
|
54561
54563
|
resetErrorInfo(saveErrorInfo);
|
|
54562
54564
|
return result;
|
|
54563
54565
|
}
|
|
54564
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
|
|
54566
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144), undefined, intersectionState)) {
|
|
54565
54567
|
resetErrorInfo(saveErrorInfo);
|
|
54566
54568
|
return result;
|
|
54567
54569
|
}
|
|
@@ -63158,8 +63160,14 @@ var ts;
|
|
|
63158
63160
|
var parameterRange = hasRestParameter ? min
|
|
63159
63161
|
: min < max ? min + "-" + max
|
|
63160
63162
|
: min;
|
|
63161
|
-
var
|
|
63162
|
-
|
|
63163
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
63164
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
63165
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
63166
|
+
}
|
|
63167
|
+
var error = hasRestParameter
|
|
63168
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
63169
|
+
: isVoidPromiseError
|
|
63170
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
63163
63171
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
63164
63172
|
if (min < args.length && args.length < max) {
|
|
63165
63173
|
return getDiagnosticForCallNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove);
|
package/lib/tsserver.js
CHANGED
|
@@ -8872,6 +8872,7 @@ var ts;
|
|
|
8872
8872
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
8873
8873
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
8874
8874
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
8875
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
8875
8876
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
8876
8877
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
8877
8878
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -37962,7 +37963,8 @@ var ts;
|
|
|
37962
37963
|
if (!comment) {
|
|
37963
37964
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
37964
37965
|
}
|
|
37965
|
-
|
|
37966
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
37967
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
37966
37968
|
}
|
|
37967
37969
|
function escapedTextsEqual(a, b) {
|
|
37968
37970
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -65539,7 +65541,7 @@ var ts;
|
|
|
65539
65541
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65540
65542
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65541
65543
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
65542
|
-
if (!strictNullChecks && (!
|
|
65544
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65543
65545
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65544
65546
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65545
65547
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65547,12 +65549,12 @@ var ts;
|
|
|
65547
65549
|
}
|
|
65548
65550
|
}
|
|
65549
65551
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65550
|
-
|
|
65552
|
+
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65551
65553
|
resetErrorInfo(saveErrorInfo);
|
|
65552
65554
|
return result;
|
|
65553
65555
|
}
|
|
65554
65556
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65555
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65557
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65556
65558
|
resetErrorInfo(saveErrorInfo);
|
|
65557
65559
|
return result;
|
|
65558
65560
|
}
|
|
@@ -75606,8 +75608,14 @@ var ts;
|
|
|
75606
75608
|
var parameterRange = hasRestParameter ? min
|
|
75607
75609
|
: min < max ? min + "-" + max
|
|
75608
75610
|
: min;
|
|
75609
|
-
var
|
|
75610
|
-
|
|
75611
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
75612
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
75613
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
75614
|
+
}
|
|
75615
|
+
var error = hasRestParameter
|
|
75616
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
75617
|
+
: isVoidPromiseError
|
|
75618
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
75611
75619
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
75612
75620
|
if (min < args.length && args.length < max) {
|
|
75613
75621
|
// between min and max, but with no matching overload
|
|
@@ -157961,6 +157969,7 @@ var ts;
|
|
|
157961
157969
|
var fixName = "addVoidToPromise";
|
|
157962
157970
|
var fixId = "addVoidToPromise";
|
|
157963
157971
|
var errorCodes = [
|
|
157972
|
+
ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
|
|
157964
157973
|
ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
|
|
157965
157974
|
];
|
|
157966
157975
|
codefix.registerCodeFix({
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -9066,6 +9066,7 @@ var ts;
|
|
|
9066
9066
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
9067
9067
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
9068
9068
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
9069
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
9069
9070
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
9070
9071
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
9071
9072
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -38156,7 +38157,8 @@ var ts;
|
|
|
38156
38157
|
if (!comment) {
|
|
38157
38158
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
38158
38159
|
}
|
|
38159
|
-
|
|
38160
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
38161
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
38160
38162
|
}
|
|
38161
38163
|
function escapedTextsEqual(a, b) {
|
|
38162
38164
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -65733,7 +65735,7 @@ var ts;
|
|
|
65733
65735
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65734
65736
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65735
65737
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
65736
|
-
if (!strictNullChecks && (!
|
|
65738
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65737
65739
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65738
65740
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65739
65741
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65741,12 +65743,12 @@ var ts;
|
|
|
65741
65743
|
}
|
|
65742
65744
|
}
|
|
65743
65745
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65744
|
-
|
|
65746
|
+
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65745
65747
|
resetErrorInfo(saveErrorInfo);
|
|
65746
65748
|
return result;
|
|
65747
65749
|
}
|
|
65748
65750
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65749
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65751
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65750
65752
|
resetErrorInfo(saveErrorInfo);
|
|
65751
65753
|
return result;
|
|
65752
65754
|
}
|
|
@@ -75800,8 +75802,14 @@ var ts;
|
|
|
75800
75802
|
var parameterRange = hasRestParameter ? min
|
|
75801
75803
|
: min < max ? min + "-" + max
|
|
75802
75804
|
: min;
|
|
75803
|
-
var
|
|
75804
|
-
|
|
75805
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
75806
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
75807
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
75808
|
+
}
|
|
75809
|
+
var error = hasRestParameter
|
|
75810
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
75811
|
+
: isVoidPromiseError
|
|
75812
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
75805
75813
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
75806
75814
|
if (min < args.length && args.length < max) {
|
|
75807
75815
|
// between min and max, but with no matching overload
|
|
@@ -158572,6 +158580,7 @@ var ts;
|
|
|
158572
158580
|
var fixName = "addVoidToPromise";
|
|
158573
158581
|
var fixId = "addVoidToPromise";
|
|
158574
158582
|
var errorCodes = [
|
|
158583
|
+
ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
|
|
158575
158584
|
ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
|
|
158576
158585
|
];
|
|
158577
158586
|
codefix.registerCodeFix({
|
package/lib/typescript.js
CHANGED
|
@@ -9066,6 +9066,7 @@ var ts;
|
|
|
9066
9066
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
9067
9067
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
9068
9068
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
9069
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
9069
9070
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
9070
9071
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
9071
9072
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -38156,7 +38157,8 @@ var ts;
|
|
|
38156
38157
|
if (!comment) {
|
|
38157
38158
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
38158
38159
|
}
|
|
38159
|
-
|
|
38160
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
38161
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
38160
38162
|
}
|
|
38161
38163
|
function escapedTextsEqual(a, b) {
|
|
38162
38164
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -65733,7 +65735,7 @@ var ts;
|
|
|
65733
65735
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65734
65736
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65735
65737
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
65736
|
-
if (!strictNullChecks && (!
|
|
65738
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65737
65739
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65738
65740
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65739
65741
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65741,12 +65743,12 @@ var ts;
|
|
|
65741
65743
|
}
|
|
65742
65744
|
}
|
|
65743
65745
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65744
|
-
|
|
65746
|
+
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65745
65747
|
resetErrorInfo(saveErrorInfo);
|
|
65746
65748
|
return result;
|
|
65747
65749
|
}
|
|
65748
65750
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65749
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65751
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65750
65752
|
resetErrorInfo(saveErrorInfo);
|
|
65751
65753
|
return result;
|
|
65752
65754
|
}
|
|
@@ -75800,8 +75802,14 @@ var ts;
|
|
|
75800
75802
|
var parameterRange = hasRestParameter ? min
|
|
75801
75803
|
: min < max ? min + "-" + max
|
|
75802
75804
|
: min;
|
|
75803
|
-
var
|
|
75804
|
-
|
|
75805
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
75806
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
75807
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
75808
|
+
}
|
|
75809
|
+
var error = hasRestParameter
|
|
75810
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
75811
|
+
: isVoidPromiseError
|
|
75812
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
75805
75813
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
75806
75814
|
if (min < args.length && args.length < max) {
|
|
75807
75815
|
// between min and max, but with no matching overload
|
|
@@ -158572,6 +158580,7 @@ var ts;
|
|
|
158572
158580
|
var fixName = "addVoidToPromise";
|
|
158573
158581
|
var fixId = "addVoidToPromise";
|
|
158574
158582
|
var errorCodes = [
|
|
158583
|
+
ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
|
|
158575
158584
|
ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
|
|
158576
158585
|
];
|
|
158577
158586
|
codefix.registerCodeFix({
|
|
@@ -9066,6 +9066,7 @@ var ts;
|
|
|
9066
9066
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
9067
9067
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
9068
9068
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
9069
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
9069
9070
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
9070
9071
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
9071
9072
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -38156,7 +38157,8 @@ var ts;
|
|
|
38156
38157
|
if (!comment) {
|
|
38157
38158
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
38158
38159
|
}
|
|
38159
|
-
|
|
38160
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
38161
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
38160
38162
|
}
|
|
38161
38163
|
function escapedTextsEqual(a, b) {
|
|
38162
38164
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -65733,7 +65735,7 @@ var ts;
|
|
|
65733
65735
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65734
65736
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65735
65737
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
65736
|
-
if (!strictNullChecks && (!
|
|
65738
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65737
65739
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65738
65740
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65739
65741
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65741,12 +65743,12 @@ var ts;
|
|
|
65741
65743
|
}
|
|
65742
65744
|
}
|
|
65743
65745
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65744
|
-
|
|
65746
|
+
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65745
65747
|
resetErrorInfo(saveErrorInfo);
|
|
65746
65748
|
return result;
|
|
65747
65749
|
}
|
|
65748
65750
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65749
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65751
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65750
65752
|
resetErrorInfo(saveErrorInfo);
|
|
65751
65753
|
return result;
|
|
65752
65754
|
}
|
|
@@ -75800,8 +75802,14 @@ var ts;
|
|
|
75800
75802
|
var parameterRange = hasRestParameter ? min
|
|
75801
75803
|
: min < max ? min + "-" + max
|
|
75802
75804
|
: min;
|
|
75803
|
-
var
|
|
75804
|
-
|
|
75805
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
75806
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
75807
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
75808
|
+
}
|
|
75809
|
+
var error = hasRestParameter
|
|
75810
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
75811
|
+
: isVoidPromiseError
|
|
75812
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
75805
75813
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
75806
75814
|
if (min < args.length && args.length < max) {
|
|
75807
75815
|
// between min and max, but with no matching overload
|
|
@@ -158572,6 +158580,7 @@ var ts;
|
|
|
158572
158580
|
var fixName = "addVoidToPromise";
|
|
158573
158581
|
var fixId = "addVoidToPromise";
|
|
158574
158582
|
var errorCodes = [
|
|
158583
|
+
ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code,
|
|
158575
158584
|
ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code
|
|
158576
158585
|
];
|
|
158577
158586
|
codefix.registerCodeFix({
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -8861,6 +8861,7 @@ var ts;
|
|
|
8861
8861
|
This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
|
|
8862
8862
|
A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
|
|
8863
8863
|
Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
|
|
8864
|
+
Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, ts.DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),
|
|
8864
8865
|
Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
|
|
8865
8866
|
Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
|
|
8866
8867
|
Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
|
|
@@ -37951,7 +37952,8 @@ var ts;
|
|
|
37951
37952
|
if (!comment) {
|
|
37952
37953
|
comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
|
|
37953
37954
|
}
|
|
37954
|
-
|
|
37955
|
+
var end = comment !== undefined ? getNodePos() : typeExpression.end;
|
|
37956
|
+
return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
|
|
37955
37957
|
}
|
|
37956
37958
|
function escapedTextsEqual(a, b) {
|
|
37957
37959
|
while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
|
|
@@ -65528,7 +65530,7 @@ var ts;
|
|
|
65528
65530
|
// IndexedAccess comparisons are handled above in the `targetFlags & TypeFlage.IndexedAccess` branch
|
|
65529
65531
|
if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) {
|
|
65530
65532
|
var constraint = getConstraintOfType(source) || unknownType;
|
|
65531
|
-
if (!strictNullChecks && (!
|
|
65533
|
+
if (!strictNullChecks && (!getConstraintOfType(source) || (sourceFlags & 262144 /* TypeParameter */ && constraint.flags & 1 /* Any */))) {
|
|
65532
65534
|
// A type variable with no constraint is not related to the non-primitive object type.
|
|
65533
65535
|
if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864 /* NonPrimitive */), 3 /* Both */)) {
|
|
65534
65536
|
resetErrorInfo(saveErrorInfo);
|
|
@@ -65536,12 +65538,12 @@ var ts;
|
|
|
65536
65538
|
}
|
|
65537
65539
|
}
|
|
65538
65540
|
// hi-speed no-this-instantiation check (less accurate, but avoids costly `this`-instantiation when the constraint will suffice), see #28231 for report on why this is needed
|
|
65539
|
-
|
|
65541
|
+
if (result = isRelatedTo(constraint, target, 1 /* Source */, /*reportErrors*/ false, /*headMessage*/ undefined, intersectionState)) {
|
|
65540
65542
|
resetErrorInfo(saveErrorInfo);
|
|
65541
65543
|
return result;
|
|
65542
65544
|
}
|
|
65543
65545
|
// slower, fuller, this-instantiated check (necessary when comparing raw `this` types from base classes), see `subclassWithPolymorphicThisIsAssignable.ts` test for example
|
|
65544
|
-
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65546
|
+
else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1 /* Source */, reportErrors && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), /*headMessage*/ undefined, intersectionState)) {
|
|
65545
65547
|
resetErrorInfo(saveErrorInfo);
|
|
65546
65548
|
return result;
|
|
65547
65549
|
}
|
|
@@ -75595,8 +75597,14 @@ var ts;
|
|
|
75595
75597
|
var parameterRange = hasRestParameter ? min
|
|
75596
75598
|
: min < max ? min + "-" + max
|
|
75597
75599
|
: min;
|
|
75598
|
-
var
|
|
75599
|
-
|
|
75600
|
+
var isVoidPromiseError = !hasRestParameter && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node);
|
|
75601
|
+
if (isVoidPromiseError && ts.isInJSFile(node)) {
|
|
75602
|
+
return getDiagnosticForCallNode(node, ts.Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments);
|
|
75603
|
+
}
|
|
75604
|
+
var error = hasRestParameter
|
|
75605
|
+
? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
|
|
75606
|
+
: isVoidPromiseError
|
|
75607
|
+
? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
|
|
75600
75608
|
: ts.Diagnostics.Expected_0_arguments_but_got_1;
|
|
75601
75609
|
if (min < args.length && args.length < max) {
|
|
75602
75610
|
// between min and max, but with no matching overload
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.7.0-pr-48861-
|
|
5
|
+
"version": "4.7.0-pr-48861-16",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|