Skip to content

Commit d39051f

Browse files
sam-superkibertoad
andauthored
fix: add missing type for 'expirationChecker' on PgConnectionConfig (knex#5334)
Co-authored-by: Igor Savin <[email protected]>
1 parent f7ccde8 commit d39051f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

test-tsd/pg-config.test-d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { expectAssignable } from 'tsd';
2+
3+
import {Knex} from '../types';
4+
import * as stream from "stream";
5+
6+
expectAssignable<Knex.PgConnectionConfig>({
7+
user: '',
8+
database: '',
9+
password: '',
10+
port: 1,
11+
host: '',
12+
connectionString: '',
13+
keepAlive: true,
14+
stream: new stream.Duplex(),
15+
statement_timeout: false,
16+
parseInputDatesAsUTC: false,
17+
ssl: true,
18+
query_timeout: 2,
19+
keepAliveInitialDelayMillis: 3,
20+
idle_in_transaction_session_timeout: 4,
21+
application_name: '',
22+
connectionTimeoutMillis: 5,
23+
types: {
24+
getTypeParser: () => {},
25+
},
26+
options: '',
27+
expirationChecker: () => {return true;},
28+
});

types/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3025,6 +3025,7 @@ export declare namespace Knex {
30253025
connectionTimeoutMillis?: number;
30263026
types?: PgCustomTypesConfig;
30273027
options?: string;
3028+
expirationChecker?(): boolean;
30283029
}
30293030

30303031
type PgGetTypeParser = (oid: number, format: string) => any;

0 commit comments

Comments
 (0)