Skip to content

Commit 6da6c70

Browse files
committed
make context optional in helper
1 parent 8b7232c commit 6da6c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/client/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class Workpool {
218218
defineOnComplete<
219219
DataModel extends GenericDataModel,
220220
// eslint-disable-next-line @typescript-eslint/no-explicit-any
221-
V extends Validator<any, "required", any> = VAny,
221+
V extends Validator<any, any, any> = VAny<any, "optional">,
222222
>({
223223
context,
224224
handler,
@@ -260,7 +260,7 @@ export function vOnCompleteArgs<
260260
>(context?: V) {
261261
return v.object({
262262
workId: vWorkIdValidator,
263-
context: context ?? v.any(),
263+
context: context ?? v.optional(v.any()),
264264
result: vResultValidator,
265265
});
266266
}

0 commit comments

Comments
 (0)