Skip to content

Commit 83b40cc

Browse files
committed
try getting eslint on custom functions
1 parent b79202d commit 83b40cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/convex-helpers/react/sessions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ const SessionContext = React.createContext<{
6868
ssrFriendly?: boolean;
6969
} | null>(null);
7070

71+
/* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */
7172
type SessionFunction<
7273
T extends "query" | "mutation" | "action",
7374
Args = any,
74-
> = FunctionReference<T, "public", { sessionId: SessionId } & Args, any>;
75+
> = FunctionReference<T, "public", { sessionId: SessionId } & Args>;
76+
/* eslint-enable @typescript-eslint/no-unnecessary-type-constraint */
7577

7678
export type SessionQueryArgsArray<Fn extends SessionFunction<"query">> =
7779
keyof FunctionArgs<Fn> extends "sessionId"

packages/convex-helpers/server/customFunctions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function customCtx<
7272
OutCtx extends Record<string, any>,
7373
>(
7474
mod: (original: InCtx) => Promise<OutCtx> | OutCtx,
75-
): Mod<InCtx, {}, OutCtx, {}> {
75+
): Mod<InCtx, Record<string, never>, OutCtx, Record<string, never>> {
7676
return {
7777
args: {},
7878
input: async (ctx) => ({ ctx: await mod(ctx), args: {} }),

0 commit comments

Comments
 (0)