Skip to content

Commit 03a2013

Browse files
committed
chore: type fixes
1 parent f6146eb commit 03a2013

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

bun.lockb

0 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"description": "Right way to work with jobs",
1414
"keywords": ["jobs", "queue", "bullmq", "bull", "pg-boss"],
15-
"version": "0.0.1",
15+
"version": "0.0.2",
1616
"type": "module",
1717
"devDependencies": {
1818
"@biomejs/biome": "^1.8.3",

src/define-job.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ import {
88
type WorkerOptions,
99
} from "bullmq";
1010

11+
type OptionsData = Omit<WorkerOptions, "connection">;
12+
1113
export class Job<GlobalInput = never> {
1214
private connection: ConnectionOptions;
1315
private name: string;
1416
queue: Queue<GlobalInput>;
1517
// TODO: depends on generic
1618
worker!: Worker<GlobalInput>;
17-
private optionsData?: Omit<WorkerOptions, "connection">;
19+
private optionsData?: OptionsData;
1820

1921
constructor(connection: ConnectionOptions, jobName: string) {
2022
this.connection = connection;
@@ -30,7 +32,7 @@ export class Job<GlobalInput = never> {
3032
return this;
3133
}
3234

33-
options(options: typeof this.optionsData) {
35+
options(options: OptionsData) {
3436
this.optionsData = options;
3537

3638
return this;

0 commit comments

Comments
 (0)