Skip to content

Commit d19252e

Browse files
authored
Merge pull request #778 from blue2cat/avoid-ext-pg-types
fix: remove implicit `@types/pg` dependency from public constructor types
2 parents 9871c7a + 52b00e3 commit d19252e

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/types.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type pg from 'pg'
2-
31
export type JobStates = {
42
created: 'created',
53
retry: 'retry',
@@ -21,9 +19,19 @@ export interface IDatabase {
2119
executeSql(text: string, values?: unknown[]): Promise<{ rows: any[] }>;
2220
}
2321

24-
export interface DatabaseOptions extends pg.PoolConfig {
22+
export interface DatabaseOptions {
23+
application_name?: string;
24+
database?: string;
25+
user?: string;
26+
password?: string | (() => string | Promise<string>);
27+
host?: string;
28+
port?: number;
2529
schema?: string;
30+
ssl?: any;
31+
connectionString?: string;
32+
max?: number;
2633
db?: IDatabase;
34+
connectionTimeoutMillis?: number;
2735
/** @internal */
2836
debug?: boolean;
2937
}

0 commit comments

Comments
 (0)