Understand the generated output format
masterThe generator produces a TypeScript file containing interfaces for your tables (models) and a central DB interface. When using customImports, overrides, or typeMapping, the generated code will include the corresponding imports and type definitions.
import type { InstantRange } from './custom-types';
import type { MyCustomType } from '@my-org/custom-types';
import type { OriginalType as AliasedType } from './types';
import type { Temporal } from '@js-temporal/polyfill';
export interface EventModel {
createdAt: Temporal.Instant;
dateRange: ColumnType<InstantRange, InstantRange, never>;
eventDate: Temporal.PlainDate;
}
export interface UserModel {
settings: { theme: 'dark' };
}
// ...
export interface DB {
bacchi: Bacchus;
events: EventModel;
users: UserModel;
}