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:
@@ -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
6
src/shims-vue.d.ts
vendored
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user