Comparing version 0.0.31 to 0.0.32
@@ -36,2 +36,12 @@ // Type definitions for pg | ||
export interface PoolConfig extends ClientConfig { | ||
// properties from module 'node-pool' | ||
max?: number; | ||
min?: number; | ||
refreshIdle?: boolean; | ||
idleTimeoutMillis?: number; | ||
reapIntervalMillis?: number; | ||
returnToHead?: boolean; | ||
} | ||
export interface QueryConfig { | ||
@@ -44,5 +54,5 @@ name?: string; | ||
export interface QueryResult { | ||
command: string; | ||
rowCount: number; | ||
oid: number; | ||
command: string; | ||
rowCount: number; | ||
oid: number; | ||
rows: any[]; | ||
@@ -55,2 +65,28 @@ } | ||
export declare class Pool extends events.EventEmitter { | ||
constructor(); | ||
// `new Pool('pg://user@localhost/mydb')` is not allowed. | ||
// But it passes type check because of issue: | ||
// https://github.com/Microsoft/TypeScript/issues/7485 | ||
constructor(config: PoolConfig); | ||
connect(): Promise<Client>; | ||
connect(callback: (err: Error, client: Client, done: () => void) => void): void; | ||
end(): Promise<void>; | ||
query(queryText: string): Promise<QueryResult>; | ||
query(queryText: string, values: any[]): Promise<QueryResult>; | ||
query(queryText: string, callback: (err: Error, result: QueryResult) => void): void; | ||
query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): void; | ||
public on(event: "error", listener: (err: Error, client: Client) => void): this; | ||
public on(event: "connect", listener: (client: Client) => void): this; | ||
public on(event: "acquire", listener: (client: Client) => void): this; | ||
public on(event: string, listener: Function): this; | ||
} | ||
export declare class Client extends events.EventEmitter { | ||
@@ -60,5 +96,9 @@ constructor(connection: string); | ||
connect(callback?: (err: Error) => void): void; | ||
connect(callback?: (err:Error) => void): void; | ||
end(): void; | ||
release(): void; | ||
query(queryText: string): Promise<QueryResult>; | ||
query(queryText: string, values: any[]): Promise<QueryResult>; | ||
query(queryText: string, callback?: (err: Error, result: QueryResult) => void): Query; | ||
@@ -65,0 +105,0 @@ query(config: QueryConfig, callback?: (err: Error, result: QueryResult) => void): Query; |
{ | ||
"name": "@types/pg", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "TypeScript definitions for pg", | ||
@@ -14,5 +14,6 @@ "license": "MIT", | ||
"dependencies": { | ||
"@types/node": "6.0.*" | ||
"@types/node": "*" | ||
}, | ||
"typings": "index.d.ts" | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "8e0af6c779ab1ea22c5ee74f4846466f225dfeeca4e189b4a430fecf328dfb31" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Thu, 25 Aug 2016 16:56:08 GMT | ||
* Last updated: Mon, 19 Sep 2016 17:28:59 GMT | ||
* File structure: ProperModule | ||
@@ -14,0 +14,0 @@ * Library Dependencies: node |
@@ -29,3 +29,3 @@ { | ||
"hasPackageJson": false, | ||
"contentHash": "7ba9783b8113b5afc3890b15e62197f78f16cecd56deb4f3c2473c83b0ac26b0" | ||
"contentHash": "8e0af6c779ab1ea22c5ee74f4846466f225dfeeca4e189b4a430fecf328dfb31" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6239
131
+ Added@types/node@22.9.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removed@types/node@6.0.118(transitive)
Updated@types/node@*