Skip to content

Commit

Permalink
fix: update Processor type definition in define.ts (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
code-xhyun authored May 2, 2024
1 parent f0283a9 commit 7c384ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pulse/define.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export interface DefineOptions {
shouldSaveResult?: boolean;
}

export type Processor<T extends JobAttributesData> = (job: Job<T>, done: () => void) => void | Promise<void>;
export type Processor<T extends JobAttributesData> = (
job: Job<T>,
done: (error?: Error, result?: unknown) => void
) => unknown | Promise<unknown>;

export type DefineMethod = <T extends JobAttributesData>(
name: string,
Expand Down

0 comments on commit 7c384ee

Please sign in to comment.