Skip to content

Commit

Permalink
fix: another adjustment to .add
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Apr 15, 2021
1 parent e1022b6 commit cafa30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/callback-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function iterateOverCallbacks<T extends Thunk<U, R>, U extends any[] = any[], R
* @param {String} key - unique key, based on which requests are bucketed
* @param {Function} callback - callback that should be added into requests queue
*/
export function add<T extends any[] = any[], R = any, X extends Thunk<T, R> = Thunk<T, R>>(key: string, callback: X): Thunk | false {
export function add<T extends any[] = any[], R = any, X extends Thunk<T, R> = Thunk<T, R>>(key: string, callback: X): Thunk<T, null | void> | false {
assert.strictEqual(typeof key, 'string', 'key must be a truthy string')
assert.ok(key, 'key must be a truthy string')
assert.strictEqual(typeof callback, 'function', 'callback must be a function')
Expand Down

0 comments on commit cafa30d

Please sign in to comment.