POSTERAPP_V1/types.d.ts

25 lines
378 B
TypeScript

import 'next-auth'
import { UserRole } from '@prisma/client'
declare module 'next-auth' {
interface User {
id: string
role: UserRole
}
interface Session {
user: {
id: string
name: string | null
email: string | null
role: UserRole
}
}
}
declare module 'next-auth/jwt' {
interface JWT {
id: string
role: UserRole
}
}