fix(test): fix type errors in worker-runtime and core-data-provider tests

Cast FakeSemanticIndexRuntime via unknown to satisfy the full
SemanticIndexRuntime interface in the factory return type.

Enable allowImportingTsExtensions in tsconfig.web.json so test files
importing .mts helpers pass vue-tsc type checking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
diguaandClaude Sonnet 4.6 committed 2026-06-23 00:21:18 +08:00
1 parent f8079d9031
commit 35b5e720d4
2 files changed
+2 -1

No files matched your search

@@ -26,7 +26,7 @@ test('worker runtime lazily creates service and forwards RPC calls', async () =>
const factory: SemanticIndexWorkerServiceFactory = () => {
const service = new FakeSemanticIndexRuntime()
services.push(service)
return service as SemanticIndexRuntime
return service as unknown as SemanticIndexRuntime
}
const runtime = createSemanticIndexWorkerRuntime({ serviceFactory: factory })