File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
packages/convex-helpers/server Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,30 @@ customAction(
147147 customCtx ( ( ctx ) => ( { } ) ) ,
148148) satisfies typeof action ;
149149
150+ customQuery ( { } as any , {
151+ args : { } ,
152+ input : async ( ) => ( {
153+ ctx : { } ,
154+ args : { } ,
155+ } ) ,
156+ } ) satisfies typeof query ;
157+
158+ customMutation ( mutation , {
159+ args : { } ,
160+ input : async ( ) => ( {
161+ ctx : { } ,
162+ args : { } ,
163+ } ) ,
164+ } ) satisfies typeof mutation ;
165+
166+ customAction ( action , {
167+ args : { } ,
168+ input : async ( ) => ( {
169+ ctx : { } ,
170+ args : { } ,
171+ } ) ,
172+ } ) satisfies typeof action ;
173+
150174/**
151175 * Testing custom function modifications.
152176 */
Original file line number Diff line number Diff line change @@ -471,7 +471,11 @@ export type CustomBuilder<
471471 ctx : Overwrite < InputCtx , ModCtx > ,
472472 ...args : ArgsForHandlerType < OneOrZeroArgs , ModMadeArgs >
473473 ) => ReturnValue ;
474- } & ExtraArgs )
474+ } & {
475+ [ key in keyof ExtraArgs as key extends "args" | "returns" | "handler"
476+ ? never
477+ : key ] : ExtraArgs [ key ] ;
478+ } )
475479 | {
476480 (
477481 ctx : Overwrite < InputCtx , ModCtx > ,
@@ -505,4 +509,4 @@ export type CustomCtx<Builder> =
505509 ? Overwrite < InputCtx , ModCtx >
506510 : never ;
507511
508- type Overwrite < T , U > = Omit < T , keyof U > & U ;
512+ type Overwrite < T , U > = keyof U extends never ? T : Omit < T , keyof U > & U ;
You can’t perform that action at this time.
0 commit comments