# KyselySchema

`type` in `plugin-kysely-postgres` · v0.1.4

<https://docs.seedcord.org/packages/plugin-kysely-postgres/0.1.4/types/kysely-schema>

The declared schema. Until [`KyselyDatabase`](/packages/plugin-kysely-postgres/0.1.4/interfaces/kysely-database) declares a `schema` this resolves to `Record<string, never>`, which widens [`KyselyTable`](/packages/plugin-kysely-postgres/0.1.4/types/kysely-table) to `string`, so any table name type-checks.

## Declaration

```ts
type KyselySchema = KyselyDatabase extends {
    schema: infer Declared extends object;
}
    ? Declared
    : Record<string, never>;
```
