Skip to content

Commit

Permalink
fix: add missing type for 'expirationChecker' on PgConnectionConfig (#…
Browse files Browse the repository at this point in the history
…5334)

Co-authored-by: Igor Savin <iselwin@gmail.com>
  • Loading branch information
sam-super and kibertoad committed Sep 27, 2022
1 parent f7ccde8 commit d39051f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test-tsd/pg-config.test-d.ts
@@ -0,0 +1,28 @@
import { expectAssignable } from 'tsd';

import {Knex} from '../types';
import * as stream from "stream";

expectAssignable<Knex.PgConnectionConfig>({
user: '',
database: '',
password: '',
port: 1,
host: '',
connectionString: '',
keepAlive: true,
stream: new stream.Duplex(),
statement_timeout: false,
parseInputDatesAsUTC: false,
ssl: true,
query_timeout: 2,
keepAliveInitialDelayMillis: 3,
idle_in_transaction_session_timeout: 4,
application_name: '',
connectionTimeoutMillis: 5,
types: {
getTypeParser: () => {},
},
options: '',
expirationChecker: () => {return true;},
});
1 change: 1 addition & 0 deletions types/index.d.ts
Expand Up @@ -3025,6 +3025,7 @@ export declare namespace Knex {
connectionTimeoutMillis?: number;
types?: PgCustomTypesConfig;
options?: string;
expirationChecker?(): boolean;
}

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

0 comments on commit d39051f

Please sign in to comment.