Skip to content

Commit 61a4ab0

Browse files
committed
fix: correct type problem on rest parameter
The error was: .../types/index.d.ts:9:29 - error TS2370: A rest parameter must be of an array type. 9 type AsyncFunction<A, O> = (...args: A) => Promise<O>; ~~~~~~~~~~ So enforce the parameter to be some kind of array.
1 parent 112d462 commit 61a4ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Timeout, Interval } from 'safe-timers';
66

77
export = Bree;
88

9-
type AsyncFunction<A, O> = (...args: A) => Promise<O>;
9+
type AsyncFunction<A extends any[], O> = (...args: A) => Promise<O>;
1010

1111
declare class Bree extends EventEmitter {
1212
config: Bree.BreeConfigs;

0 commit comments

Comments
 (0)