import type * as Table from "./Table"; export declare const TypeId = "~@confect/server/DatabaseSchema"; export type TypeId = typeof TypeId; export interface Any { readonly [TypeId]: unknown; } export declare const isDatabaseSchema: (u: unknown) => u is Any; /** * A schema definition holding a record of bound `Table`s keyed by table name. * Codegen emits a single static `DatabaseSchema.make({ ... })` call; laziness * lives entirely on each `Table` (its `Fields` and `Doc` are lazy memoised * getters), so this layer is a plain record indirection with no module-loading * or async machinery. */ export interface DatabaseSchema> = {}> { readonly [TypeId]: Readonly; } export interface AnyWithProps extends DatabaseSchema>> { } export type Tables = DatabaseSchema_[TypeId][keyof DatabaseSchema_[TypeId]]; /** * The bound table record, without evaluating any table schemas. */ export declare const tables: (self: Schema) => Schema[TypeId]; export type TableNames = Table.Name> & string; export type TableWithName> = Extract, { readonly tableName: TableName; }>; /** * Construct a database schema from its bound table record. The record's keys * must match their tables' names. Table schemas remain lazy; construction only * stores the record. The empty case is `make({})`. */ export declare const make: >>(tableRecord: TablesRecord) => DatabaseSchema; //# sourceMappingURL=DatabaseSchema.d.ts.map