File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30414,7 +30414,7 @@ namespace ts {
30414
30414
: min < max ? min + "-" + max
30415
30415
: min;
30416
30416
const error = hasRestParameter ? Diagnostics.Expected_at_least_0_arguments_but_got_1
30417
- : parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node) ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
30417
+ : parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node) ? Diagnostics.Expected_0_arguments_but_got_1_TypeScript_may_need_a_JSDoc_hint_that_the_call_to_new_Promise_produces_a_Promise_void
30418
30418
: Diagnostics.Expected_0_arguments_but_got_1;
30419
30419
if (min < args.length && args.length < max) {
30420
30420
// between min and max, but with no matching overload
Original file line number Diff line number Diff line change 3309
3309
"category" : " Error" ,
3310
3310
"code" : 2793
3311
3311
},
3312
- "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'? " : {
3312
+ "Expected {0} arguments, but got {1}. TypeScript may need a JSDoc hint that the call to 'new Promise()' produces a 'Promise<void>' " : {
3313
3313
"category" : " Error" ,
3314
3314
"code" : 2794
3315
3315
},
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ namespace ts.codefix {
3
3
const fixName = "addVoidToPromise" ;
4
4
const fixId = "addVoidToPromise" ;
5
5
const errorCodes = [
6
- Diagnostics . Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise . code
6
+ Diagnostics . Expected_0_arguments_but_got_1_TypeScript_may_need_a_JSDoc_hint_that_the_call_to_new_Promise_produces_a_Promise_void . code
7
7
] ;
8
8
registerCodeFix ( {
9
9
errorCodes,
You can’t perform that action at this time.
0 commit comments