File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ function ready(
118118 } else if ( descriptor . set != null ) {
119119 kind = 'set' ;
120120 }
121- const f : Function = descriptor [ kind ] ;
121+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
122+ const f = descriptor [ kind ] as AnyFn ;
122123 if ( typeof f !== 'function' ) {
123124 throw new TypeError ( `${ key } is not a function` ) ;
124125 }
Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ function ready(
238238 } else if ( descriptor . set != null ) {
239239 kind = 'set' ;
240240 }
241- const f : Function = descriptor [ kind ] ;
241+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
242+ const f = descriptor [ kind ] as AnyFn ;
242243 if ( typeof f !== 'function' ) {
243244 throw new TypeError ( `${ key } is not a function` ) ;
244245 }
Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ function ready(
159159 } else if ( descriptor . set != null ) {
160160 kind = 'set' ;
161161 }
162- const f : Function = descriptor [ kind ] ;
162+ type AnyFn = ( ...args : Array < unknown > ) => unknown ;
163+ const f = descriptor [ kind ] as AnyFn ;
163164 if ( typeof f !== 'function' ) {
164165 throw new TypeError ( `${ key } is not a function` ) ;
165166 }
Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ function promise<T = void>(): PromiseDeconstructed<T> {
4242 * This function rewrites the stack trace according to where the wrapped
4343 * function is called, giving a more useful stack trace
4444 */
45- function resetStackTrace ( error : Error , decorated ?: Function ) : void {
45+ function resetStackTrace (
46+ error : Error ,
47+ decorated ?: ( ...args : Array < unknown > ) => unknown ,
48+ ) : void {
4649 if ( error . stack != null ) {
4750 const stackTitle = error . stack . slice ( 0 , error . stack . indexOf ( '\n' ) + 1 ) ;
4851 if ( hasCaptureStackTrace ) {
You can’t perform that action at this time.
0 commit comments