We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1022b6 commit cafa30dCopy full SHA for cafa30d
1 file changed
src/callback-queue.ts
@@ -35,7 +35,7 @@ function iterateOverCallbacks<T extends Thunk<U, R>, U extends any[] = any[], R
35
* @param {String} key - unique key, based on which requests are bucketed
36
* @param {Function} callback - callback that should be added into requests queue
37
*/
38
-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 {
39
assert.strictEqual(typeof key, 'string', 'key must be a truthy string')
40
assert.ok(key, 'key must be a truthy string')
41
assert.strictEqual(typeof callback, 'function', 'callback must be a function')
0 commit comments