fix(frontend): align zod v4 typings and defaults
Some checks failed
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Build and Push CICD Images (push) Has been cancelled
CICD / Source Checks (push) Has been cancelled
CICD / Dependency Audits (Informational) (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Release Images (push) Has been cancelled
CICD / Build Tester Images (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Production Image Failures Postmortem (push) Has been cancelled
CICD / Source Lanes Failure Postmortem (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / Integration Tests Failure Postmortem (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Promote Staging Images To Release (push) Has been cancelled
Some checks failed
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Build and Push CICD Images (push) Has been cancelled
CICD / Source Checks (push) Has been cancelled
CICD / Dependency Audits (Informational) (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Release Images (push) Has been cancelled
CICD / Build Tester Images (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Production Image Failures Postmortem (push) Has been cancelled
CICD / Source Lanes Failure Postmortem (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / Integration Tests Failure Postmortem (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Promote Staging Images To Release (push) Has been cancelled
This commit is contained in:
@@ -46,10 +46,7 @@ function enhancedParse<T>(this: z.ZodType<T>, data: unknown): T {
|
||||
* @param data - The data to validate against the schema
|
||||
* @returns Safe parse result with success flag and data or error
|
||||
*/
|
||||
function enhancedSafeParse<T>(
|
||||
this: z.ZodType<T>,
|
||||
data: unknown
|
||||
): z.SafeParseReturnType<unknown, T> {
|
||||
function enhancedSafeParse<T>(this: z.ZodType<T>, data: unknown) {
|
||||
const result = originalSafeParse.call(this, data);
|
||||
validationCount++;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export const UserSchema = z.object({
|
||||
theme: z.enum(['light', 'dark']).default('light'),
|
||||
notifications: z.boolean().default(true),
|
||||
})
|
||||
.default({}),
|
||||
.default({ theme: 'light', notifications: true }),
|
||||
});
|
||||
|
||||
// Inferred types (no manual type definitions needed)
|
||||
|
||||
Reference in New Issue
Block a user