Skip to content

Commit 9998892

Browse files
authored
Merge pull request #769 from blue2cat/fix/pg-database-options
Match `pg.PoolConfig` typing on `DatabaseOptions`
2 parents 25840d8 + 526589b commit 9998892

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/types.ts

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

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;
24+
export interface DatabaseOptions extends pg.PoolConfig {
2925
schema?: string;
30-
ssl?: any;
31-
connectionString?: string;
32-
max?: number;
3326
db?: IDatabase;
34-
connectionTimeoutMillis?: number;
3527
/** @internal */
3628
debug?: boolean;
3729
}

0 commit comments

Comments
 (0)