mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 12:44:47 -05:00
17 lines
337 B
TypeScript
17 lines
337 B
TypeScript
import { z } from "zod";
|
|
|
|
export type LoggedInUser = NonNullable<
|
|
z.infer<typeof LoggedInUserSchema>
|
|
>["user"];
|
|
export const LoggedInUserSchema = z
|
|
.object({
|
|
user: z
|
|
.object({
|
|
id: z.string(),
|
|
discordId: z.string(),
|
|
discordAvatar: z.string().nullable(),
|
|
})
|
|
.nullish(),
|
|
})
|
|
.nullish();
|