Skip to content

Commit 5f1c07a

Browse files
committed
docs: fix schema extension example
1 parent fd87992 commit 5f1c07a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,10 @@ import * as schema from "~~/db/client-schema.ts"
200200
declare module "#witchcraft/nuxt-postgres/types.js" {
201201
export interface Register {
202202
ExtendedLocalPgDbTypes: {
203-
"client": typeof schema
203+
"client": PgliteDatabase<typeof schema> | PgRemoteDatabase<typeof schema>
204204
}
205+
// or to type many dbs the same (e.g. one per user)
206+
// ExtendedLocalPgDbTypes: Record<string, PgliteDatabase<typeof schema> | PgRemoteDatabase<typeof schema>>
205207
}
206208
}
207209
export {}

0 commit comments

Comments
 (0)