Z
Zod5w ago
Leozinn

Leozinn - const AuthorSchema = z.object({ ...

const AuthorSchema = z.object({
name: z.string().max(256),
url: z.string().url().optional().nullable(),
icon_url: z.string().url().optional().nullable(),
proxy_icon_url: z.string().url().optional().nullable(),
});

const EsteticaPropsSchema = z.object({
author: AuthorSchema.optional().nullable(),
});
const AuthorSchema = z.object({
name: z.string().max(256),
url: z.string().url().optional().nullable(),
icon_url: z.string().url().optional().nullable(),
proxy_icon_url: z.string().url().optional().nullable(),
});

const EsteticaPropsSchema = z.object({
author: AuthorSchema.optional().nullable(),
});
why is the name optional? if i didn't define it as optional
No description
1 Reply
Scott Trinh
Scott Trinh5w ago
Looks like you do not have strict or strictNullChecks on in your tsconfig maybe? Also notable that you're not seeing your nullable anywhere

Did you find this page helpful?