Skip to content

Commit

Permalink
Merge pull request #44 from aklkv/fix/queue-ts
Browse files Browse the repository at this point in the history
fix: `queue` signature
  • Loading branch information
NullVoxPopuli authored Feb 24, 2025
2 parents ef40dd1 + 304eb64 commit 6415108
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ember-composable-helpers/src/helpers/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ function invokeMaybeNullable(curr: (...args1: unknown[]) => void | null, args: u
return curr == null ? undefined : curr(...args);
}

export function queue(actions: (() => void)[] = []) {

export function queue(positional: unknown[] = []) {
const actions = positional as (() => void)[];

return function(...args: unknown[]) {
let invokeWithArgs = function(acc: unknown, curr: () => void) {
if (isPromise(acc)) {
Expand All @@ -25,4 +28,4 @@ export function queue(actions: (() => void)[] = []) {
};
}

export default helper(queue as (actions: unknown[]) => unknown);
export default helper(queue);

0 comments on commit 6415108

Please sign in to comment.