Skip to content

Commit f23ccc2

Browse files
authored
Merge pull request #126 from 0xcadams/0xcadams/types
fix: added types
2 parents 84c96e4 + 8a3f011 commit f23ccc2

4 files changed

Lines changed: 125 additions & 122 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-zero",
3-
"version": "0.12.0-beta.2",
3+
"version": "0.12.0",
44
"description": "Generate Zero schemas from Drizzle ORM schemas",
55
"type": "module",
66
"scripts": {

src/node-postgres/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import type {
77
import type { PgTransaction } from "drizzle-orm/pg-core";
88
import type { ExtractTablesWithRelations } from "drizzle-orm/relations";
99

10+
export type NodePgZeroTransaction<
11+
TDatabase extends NodePgDatabase<Record<string, unknown>>,
12+
> = Parameters<Parameters<TDatabase["transaction"]>[0]>[0] & {};
13+
1014
export class NodePgConnection<
1115
TDrizzle extends NodePgDatabase<Record<string, unknown>> & {
1216
$client: NodePgClient;

src/postgres-js/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import type {
77
import type { ExtractTablesWithRelations } from "drizzle-orm/relations";
88
import type postgres from "postgres";
99

10+
export type PostgresJsZeroTransaction<
11+
TDatabase extends PostgresJsDatabase<Record<string, unknown>>,
12+
> = Parameters<Parameters<TDatabase["transaction"]>[0]>[0] & {};
13+
1014
export class PostgresJsConnection<
1115
TDrizzle extends PostgresJsDatabase<Record<string, unknown>> & {
1216
$client: postgres.Sql<{}>;

0 commit comments

Comments
 (0)