mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
[pg] Updated Client and Pool config types according to docs (#40728)
* Fixed Client and Pool config types for pg * Add ConnectionConfig alias
This commit is contained in:
committed by
Andrew Branch
parent
51c0be8d2d
commit
da9a21ba57
Vendored
+9
-10
@@ -1,4 +1,4 @@
|
||||
// Type definitions for pg 7.11
|
||||
// Type definitions for pg 7.14
|
||||
// Project: http://github.com/brianc/node-postgres
|
||||
// Definitions by: Phips Peter <https://github.com/pspeter3>, Ravi van Rooijen <https://github.com/HoldYourWaffle>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -10,7 +10,9 @@ import events = require("events");
|
||||
import stream = require("stream");
|
||||
import pgTypes = require("pg-types");
|
||||
|
||||
export interface ConnectionConfig {
|
||||
import { ConnectionOptions } from "tls";
|
||||
|
||||
export interface ClientConfig {
|
||||
user?: string;
|
||||
database?: string;
|
||||
password?: string;
|
||||
@@ -20,11 +22,14 @@ export interface ConnectionConfig {
|
||||
keepAlive?: boolean;
|
||||
stream?: stream.Duplex;
|
||||
statement_timeout?: false | number;
|
||||
connectionTimeoutMillis?: number;
|
||||
ssl?: boolean | ConnectionOptions;
|
||||
query_timeout?: number;
|
||||
keepAliveInitialDelayMillis?: number;
|
||||
}
|
||||
|
||||
export interface Defaults extends ConnectionConfig {
|
||||
export type ConnectionConfig = ClientConfig;
|
||||
|
||||
export interface Defaults extends ClientConfig {
|
||||
poolSize?: number;
|
||||
poolIdleTimeout?: number;
|
||||
reapIntervalMillis?: number;
|
||||
@@ -32,12 +37,6 @@ export interface Defaults extends ConnectionConfig {
|
||||
parseInt8?: boolean;
|
||||
}
|
||||
|
||||
import { ConnectionOptions } from "tls";
|
||||
|
||||
export interface ClientConfig extends ConnectionConfig {
|
||||
ssl?: boolean | ConnectionOptions;
|
||||
}
|
||||
|
||||
export interface PoolConfig extends ClientConfig {
|
||||
// properties from module 'node-pool'
|
||||
max?: number;
|
||||
|
||||
Reference in New Issue
Block a user