Skip to content

Commit d1aff1d

Browse files
committed
cast customInput
1 parent 45113e4 commit d1aff1d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/convex-helpers/server/customFunctions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const NoOp = {
200200
input() {
201201
return { args: {}, ctx: {} };
202202
},
203-
} satisfies Customization<any, any, any, any, any>;
203+
};
204204

205205
/**
206206
* customQuery helps define custom behavior on top of `query` or `internalQuery`
@@ -483,7 +483,8 @@ function customFnBuilder(
483483
customization: Customization<any, any, any, any, any>,
484484
) {
485485
// Looking forward to when input / args / ... are optional
486-
const customInput = customization.input ?? NoOp.input;
486+
const customInput: Customization<any, any, any, any, any>["input"] =
487+
customization.input ?? NoOp.input;
487488
const inputArgs = customization.args ?? NoOp.args;
488489
return function customBuilder(fn: any): any {
489490
// N.B.: This is fine if it's a function

packages/convex-helpers/server/zod.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ function customFnBuilder(
338338
customization: Customization<any, any, any, any, any>,
339339
) {
340340
// Looking forward to when input / args / ... are optional
341-
const customInput = customization.input ?? NoOp.input;
341+
const customInput: Customization<any, any, any, any, any>["input"] =
342+
customization.input ?? NoOp.input;
342343
const inputArgs = customization.args ?? NoOp.args;
343344
return function customBuilder(fn: any): any {
344345
const { args, handler = fn, returns: maybeObject, ...extra } = fn;

0 commit comments

Comments
 (0)