@types/generic-pool
Advanced tools
Comparing version 3.1.11 to 3.8.1
{ | ||
"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! |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
1772
3
0
2
1
1
3
1
1
+ Addedgeneric-pool@*
+ Addedgeneric-pool@3.9.0(transitive)
- Removed@types/node@*
- Removed@types/node@22.10.1(transitive)
- Removedundici-types@6.20.0(transitive)