UNPKG

kysely-mapper

Version:

Flexible Kysely-based utility for mapping between tables and objects

21 lines 577 B
import { Kysely, Generated } from 'kysely'; export interface Users { id: Generated<number>; handle: string; name: string; email: string | null; } export interface Posts { id: Generated<number>; userId: number; title: string; likeCount: number; createdAt: Generated<Date>; } export interface Database { users: Users; posts: Posts; } export declare function createTables(db: Kysely<Database>): Promise<Kysely<Database>>; export declare function dropTables(db: Kysely<Database>): Promise<void>; //# sourceMappingURL=test-tables.d.ts.map