-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.d.ts
More file actions
38 lines (36 loc) · 1.07 KB
/
types.d.ts
File metadata and controls
38 lines (36 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Session } from 'inspector';
import { Profile } from 'next-auth';
import { JWT } from 'next-auth/jwt';
import type { User as PrismaUser } from 'prisma/prisma-client';
// Think it's fixed?
declare module 'next-auth' {
// How do I set this to be User type from Prisma.
// Right now it's manually just pasted over...
interface User {
id: string;
name: string | null;
email: string | null;
emailVerified: Date | null;
image: string | null;
selectedPomodoroFormatId: string;
riseOfIX: boolean;
immortality: boolean;
}
interface Session {
user: PrismaUser;
}
}
declare module 'next-auth/jwt' {
interface JWT {
user?: PrismaUser;
}
}
declare module 'next-auth/core' {
interface User extends PrismaUser {}
}
/*
declare module 'next-auth/core' {
interface CallbacksOptions<P extends Record<string, unknown> = Profile, A extends Record<string, unknown> = Account> {
session: (params: { session: Session; user: User; token: JWT }) => Awaitable<Session>;
}
}*/