breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
2.96k stars 80 forks source link

fix: correct type problem on rest parameter #181

Closed mat813 closed 2 years ago

mat813 commented 2 years ago

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.

Checklist

titanism commented 2 years ago

v9.0.1 published to npm

https://github.com/breejs/bree/releases/tag/v9.0.1