Skip to content

Commit cafa30d

Browse files
committed
fix: another adjustment to .add
1 parent e1022b6 commit cafa30d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/callback-queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function iterateOverCallbacks<T extends Thunk<U, R>, U extends any[] = any[], R
3535
* @param {String} key - unique key, based on which requests are bucketed
3636
* @param {Function} callback - callback that should be added into requests queue
3737
*/
38-
export function add<T extends any[] = any[], R = any, X extends Thunk<T, R> = Thunk<T, R>>(key: string, callback: X): Thunk | false {
38+
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 {
3939
assert.strictEqual(typeof key, 'string', 'key must be a truthy string')
4040
assert.ok(key, 'key must be a truthy string')
4141
assert.strictEqual(typeof callback, 'function', 'callback must be a function')

0 commit comments

Comments
 (0)