rallly/apps/web/declarations/next-auth.d.ts
dependabot[bot] ffafcbdb43
⬆️ Bump vitest from 2.1.1 to 2.1.9 (#1548)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Luke Vella <me@lukevella.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-08 14:43:15 +07:00

38 lines
1 KiB
TypeScript

/* eslint-disable @typescript-eslint/no-unused-vars */
import type { TimeFormat } from "@rallly/database";
import type { DefaultSession, DefaultUser } from "next-auth";
import NextAuth from "next-auth";
import type { DefaultJWT } from "next-auth/jwt";
import { JWT } from "next-auth/jwt";
declare module "next-auth" {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
user?: {
id: string;
timeZone?: string | null;
timeFormat?: TimeFormat | null;
locale?: string | null;
weekStart?: number | null;
} & DefaultSession["user"];
}
interface User extends DefaultUser {
id: string;
locale?: string | null;
timeZone?: string | null;
timeFormat?: TimeFormat | null;
weekStart?: number | null;
}
}
declare module "next-auth/jwt" {
interface JWT extends DefaultJWT {
locale?: string | null;
timeZone?: string | null;
timeFormat?: TimeFormat | null;
weekStart?: number | null;
}
}