Uname:Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64

Base Dir : /var/www/machinox.in

User : root


403WebShell
403Webshell
Server IP : 13.235.167.51  /  Your IP : 216.73.217.116
Web Server : Apache
System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64
User : root ( 0)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/control.machinox.in/node_modules/next/dist/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/control.machinox.in/node_modules/next/dist/lib/batcher.d.ts
import type { SchedulerFn } from './scheduler';
type CacheKeyFn<K, C extends string | number | null> = (key: K) => PromiseLike<C> | C;
type BatcherOptions<K, C extends string | number | null> = {
    cacheKeyFn?: CacheKeyFn<K, C>;
    schedulerFn?: SchedulerFn<void>;
};
type WorkFnContext<V, K> = {
    resolve: (value: V | PromiseLike<V>) => void;
    key: K;
};
type WorkFn<V, K> = (context: WorkFnContext<V, K>) => Promise<V>;
/**
 * A wrapper for a function that will only allow one call to the function to
 * execute at a time.
 */
export declare class Batcher<K, V, C extends string | number | null> {
    private readonly cacheKeyFn?;
    /**
     * A function that will be called to schedule the wrapped function to be
     * executed. This defaults to a function that will execute the function
     * immediately.
     */
    private readonly schedulerFn;
    private readonly pending;
    protected constructor(cacheKeyFn?: CacheKeyFn<K, C> | undefined, 
    /**
     * A function that will be called to schedule the wrapped function to be
     * executed. This defaults to a function that will execute the function
     * immediately.
     */
    schedulerFn?: SchedulerFn<void>);
    /**
     * Creates a new instance of PendingWrapper. If the key extends a string or
     * number, the key will be used as the cache key. If the key is an object, a
     * cache key function must be provided.
     */
    static create<K extends string | number | null, V>(options?: BatcherOptions<K, K>): Batcher<K, V, K>;
    static create<K, V, C extends string | number | null>(options: BatcherOptions<K, C> & Required<Pick<BatcherOptions<K, C>, 'cacheKeyFn'>>): Batcher<K, V, C>;
    /**
     * Wraps a function in a promise that will be resolved or rejected only once
     * for a given key. This will allow multiple calls to the function to be
     * made, but only one will be executed at a time. The result of the first
     * call will be returned to all callers.
     *
     * @param key the key to use for the cache
     * @param fn the function to wrap
     * @returns a promise that resolves to the result of the function
     */
    batch(key: K, fn: WorkFn<V, K>): Promise<V>;
}
export {};

Youez - 2016 - github.com/yon3zu
LinuXploit