fix: resolve all TypeScript type errors

- Install missing comlink (was in lockfile but not node_modules)
- Add @ts-rest/core and @ts-rest/vue-query (imported but not declared as deps)
- Add declare module '*.vue' shim to shims-vue.d.ts
- Replace arktype validators in ts-rest contract with contract.type<T>() since @ts-rest expects Zod schemas
This commit is contained in:
Julien Calixte
2026-04-06 15:05:57 +02:00
parent 8d9134a062
commit f3e74aed34
4 changed files with 52 additions and 17 deletions

View File

@@ -29,31 +29,19 @@ export const noteRouter = contract.router({
noteLists: {
method: "GET",
path: "/notes",
query: type({
cursor: "string | undefined",
limit: "number | undefined"
}),
query: contract.type<{ cursor?: string; limit?: number }>(),
responses: {
200: type({
notes: PublicNoteListItem.array()
})
200: contract.type<{ notes: PublicNoteListItem[] }>()
},
summary: "List all notes"
},
noteListsByDid: {
method: "GET",
path: "/:did/notes",
pathParams: type({
did: "string"
}),
query: type({
cursor: "string | undefined",
limit: "number | undefined"
}),
pathParams: contract.type<{ did: string }>(),
query: contract.type<{ cursor?: string; limit?: number }>(),
responses: {
200: type({
notes: PublicNoteListItem.array()
})
200: contract.type<{ notes: PublicNoteListItem[] }>()
},
summary: "List all notes"
}

6
src/shims-vue.d.ts vendored
View File

@@ -1,3 +1,9 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
declare module "pouchdb-adapter-indexeddb"
declare module "@toycode/markdown-it-class"
declare module "markdown-it-block-embed"