drizzle-team / drizzle-team/drizzle-orm

[DOCS]: undocumented removed TS types `PgDatabase` and `PgTransaction` in v1 release candidate

Open
#6,091 2 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Enhancement hasn't been filed before.

- [x] I have verified this enhancement I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

I'm using the `PgDatabase` and `PgTransaction` types to expose `$client` via declaration merging, but these types are no longer exported from the v1 release candidate:

```ts
import {
NodePgDatabase,
type NodePgQueryResultHKT,
} from "drizzle-orm/node-postgres";
import * as schema from "./schema.ts";
import type { Pool } from "pg";
import type { PgDatabase, PgTransaction } from "drizzle-orm/pg-core";
import type { ExtractTablesWithRelations } from "drizzle-orm";

declare module "drizzle-orm/node-postgres/driver" {
export interface NodePgDatabase<
TSchema extends Record = Record,
> extends PgDatabase {
// declaration merge this into the class type
$client: Pool;
}
}

export type Database = NodePgDatabase;
export type Transaction = PgTransaction<
NodePgQueryResultHKT,
typeof schema,
ExtractTablesWithRelations
>;
```

Contributor guide

Open the contributing guide

Research direction

Review the v1 release-candidate entry points shown in the example: drizzle-orm/node-postgres, drizzle-orm/pg-core, and drizzle-orm/node-postgres/driver. Check how PgDatabase and PgTransaction are currently exposed or replaced, then update the relevant documentation to explain their availability and declaration-merging usage. Done means users can determine the supported types and imports from the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, postgresql, typescript
Domain
databases, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.