From 0dae30b4e20fb2a11e9100675ae9b4e192845832 Mon Sep 17 00:00:00 2001 From: kawa Date: Wed, 26 Aug 2026 17:37:47 +0200 Subject: [PATCH] fix: resolve remaining TypeScript compilation errors - Add placeholder property to TextFieldMD3 component and props interface - Fix vite.config.ts to import defineConfig from vitest/config instead of vite - Add type guard for validate property in schemas/index.ts to handle readonly array union types - Remove unused StepIndicatorWithDispatch placeholder function from tests Co-Authored-By: Claude Haiku 4.5 --- src/components/ui/TextFieldMD3.tsx | 4 +++- src/components/wizard/StepIndicator.test.tsx | 5 ----- src/schemas/index.ts | 2 +- vite.config.ts | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/ui/TextFieldMD3.tsx b/src/components/ui/TextFieldMD3.tsx index 230837f..c89304d 100644 --- a/src/components/ui/TextFieldMD3.tsx +++ b/src/components/ui/TextFieldMD3.tsx @@ -6,6 +6,7 @@ interface TextFieldMD3Props { error?: FieldError; registration: UseFormRegisterReturn; type?: 'text' | 'password'; + placeholder?: string; helpText?: string; helpTextPrefix?: React.ReactNode; required?: boolean; @@ -18,6 +19,7 @@ export function TextFieldMD3({ error, registration, type = 'text', + placeholder, helpText, helpTextPrefix, required, @@ -29,7 +31,7 @@ export function TextFieldMD3({ { }); }); }); - -// Placeholder type for the spy component — not actually used in tests -function StepIndicatorWithDispatch(_props: { dispatch: (action: { type: string; payload?: unknown }) => void }) { - return null; -} diff --git a/src/schemas/index.ts b/src/schemas/index.ts index eb0c4c4..bd02aa4 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -15,7 +15,7 @@ function buildZodSchema(backendType: BackendType): z.ZodObject