YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: TypeScript errors in validation.ts and vitest.setup.ts
Louis Beaumont5df703f1fbf5
diff --git a/screenpipe-app-tauri/lib/utils/validation.ts b/screenpipe-app-tauri/lib/utils/validation.tsindex 4c6715c6f..90657fd06 100644--- a/screenpipe-app-tauri/lib/utils/validation.ts+++ b/screenpipe-app-tauri/lib/utils/validation.ts@@ -129,7 +129,8 @@ export const validateField = (value: any): FieldValidationResult => {try {- const fieldSchema = settingsStoreSchema.shape[field];+ const schemaShape = settingsStoreSchema.shape as Record<string, z.ZodTypeAny>;+ const fieldSchema = schemaShape[field];if (!fieldSchema) {return { isValid: false, error: "Unknown field" };}diff --git a/screenpipe-app-tauri/vitest.setup.ts b/screenpipe-app-tauri/vitest.setup.tsindex ed6f4bec8..573471347 100644--- a/screenpipe-app-tauri/vitest.setup.ts+++ b/screenpipe-app-tauri/vitest.setup.ts@@ -6,17 +6,12 @@ if (typeof window === "undefined") {url: "http://localhost",});- const globalWithDom = globalThis as typeof globalThis & {- window: Window;- document: Document;- navigator: Navigator;- location: Location;- HTMLElement: typeof HTMLElement;- };+ // eslint-disable-next-line @typescript-eslint/no-explicit-any+ const globalWithDom = globalThis as any;- globalWithDom.window = dom.window as unknown as Window;+ globalWithDom.window = dom.window;globalWithDom.document = dom.window.document;- globalWithDom.navigator = dom.window.navigator as Navigator;+ globalWithDom.navigator = dom.window.navigator;globalWithDom.location = dom.window.location;globalWithDom.HTMLElement = dom.window.HTMLElement;}