File tree 4 files changed +10
-4
lines changed
4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ function ready(
118
118
} else if ( descriptor . set != null ) {
119
119
kind = 'set' ;
120
120
}
121
- const f : Function = descriptor [ kind ] ;
121
+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
122
+ const f = descriptor [ kind ] as AnyFn ;
122
123
if ( typeof f !== 'function' ) {
123
124
throw new TypeError ( `${ key } is not a function` ) ;
124
125
}
Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ function ready(
238
238
} else if ( descriptor . set != null ) {
239
239
kind = 'set' ;
240
240
}
241
- const f : Function = descriptor [ kind ] ;
241
+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
242
+ const f = descriptor [ kind ] as AnyFn ;
242
243
if ( typeof f !== 'function' ) {
243
244
throw new TypeError ( `${ key } is not a function` ) ;
244
245
}
Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ function ready(
159
159
} else if ( descriptor . set != null ) {
160
160
kind = 'set' ;
161
161
}
162
- const f : Function = descriptor [ kind ] ;
162
+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
163
+ const f = descriptor [ kind ] as AnyFn ;
163
164
if ( typeof f !== 'function' ) {
164
165
throw new TypeError ( `${ key } is not a function` ) ;
165
166
}
Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ function promise<T = void>(): PromiseDeconstructed<T> {
42
42
* This function rewrites the stack trace according to where the wrapped
43
43
* function is called, giving a more useful stack trace
44
44
*/
45
- function resetStackTrace ( error : Error , decorated ?: Function ) : void {
45
+ function resetStackTrace (
46
+ error : Error ,
47
+ decorated ?: ( ...args : Array < unknown > ) => unknown ,
48
+ ) : void {
46
49
if ( error . stack != null ) {
47
50
const stackTitle = error . stack . slice ( 0 , error . stack . indexOf ( '\n' ) + 1 ) ;
48
51
if ( hasCaptureStackTrace ) {
You can’t perform that action at this time.
0 commit comments