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

@types/generic-pool

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/generic-pool - npm Package Compare versions

Comparing version 3.1.11 to 3.8.1

30

generic-pool/package.json
{
"name": "@types/generic-pool",
"version": "3.1.11",
"description": "TypeScript definitions for generic-pool",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/generic-pool",
"license": "MIT",
"contributors": [
{
"name": "Jerray Fu",
"url": "https://github.com/jerray",
"githubUsername": "jerray"
},
{
"name": "Will Boyce",
"url": "https://github.com/wrboyce",
"githubUsername": "wrboyce"
}
],
"version": "3.8.1",
"description": "Stub TypeScript definitions entry for generic-pool, which provides its own types definitions",
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/generic-pool"
},
"scripts": {},
"license": "MIT",
"dependencies": {
"@types/node": "*"
"generic-pool": "*"
},
"typesPublisherContentHash": "c686a1d2550b2cf864cef9bb4a0b6d62c5fa41f5408a626c44a24aff7125b0ac",
"typeScriptVersion": "4.0"
"deprecated": "This is a stub types definition. generic-pool provides its own type definitions, so you do not need this installed."
}

@@ -1,72 +0,3 @@

# Installation
> `npm install --save @types/generic-pool`
This is a stub types definition for @types/generic-pool (https://github.com/coopernurse/node-pool#readme).
# Summary
This package contains type definitions for generic-pool (https://github.com/coopernurse/node-pool#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/generic-pool.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/generic-pool/index.d.ts)
````ts
// Type definitions for generic-pool 3.1
// Project: https://github.com/coopernurse/node-pool#readme
// Definitions by: Jerray Fu <https://github.com/jerray>
// Will Boyce <https://github.com/wrboyce>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { EventEmitter } from "events";
export class Pool<T> extends EventEmitter {
spareResourceCapacity: number;
size: number;
available: number;
borrowed: number;
pending: number;
max: number;
min: number;
start(): void;
acquire(priority?: number): PromiseLike<T>;
release(resource: T): PromiseLike<void>;
destroy(resource: T): PromiseLike<void>;
drain(): PromiseLike<void>;
clear(): PromiseLike<void>;
use<U>(cb: (resource: T) => PromiseLike<U>): PromiseLike<U>;
isBorrowedResource(resource: T): boolean;
}
export interface Factory<T> {
create(): PromiseLike<T>;
destroy(client: T): PromiseLike<void>;
validate?(client: T): PromiseLike<boolean>;
}
export interface Options {
max?: number | undefined;
min?: number | undefined;
maxWaitingClients?: number | undefined;
testOnBorrow?: boolean | undefined;
testOnReturn?: boolean | undefined;
acquireTimeoutMillis?: number | undefined;
fifo?: boolean | undefined;
priorityRange?: number | undefined;
autostart?: boolean | undefined;
evictionRunIntervalMillis?: number | undefined;
numTestsPerEvictionRun?: number | undefined;
softIdleTimeoutMillis?: number | undefined;
idleTimeoutMillis?: number | undefined;
}
export function createPool<T>(factory: Factory<T>, opts?: Options): Pool<T>;
````
### Additional Details
* Last updated: Sat, 25 Jun 2022 05:01:35 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by [Jerray Fu](https://github.com/jerray), and [Will Boyce](https://github.com/wrboyce).
generic-pool provides its own type definitions, so you don't need @types/generic-pool installed!
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