Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/pg

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/pg - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

48

pg/index.d.ts

@@ -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;

7

pg/package.json
{
"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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc