import type { ResourceAcquire } from '@matrixai/resources'; import type { PromiseCancellableController } from '@matrixai/async-cancellable'; import type { RWLockReader, RWLockWriter, LockBox } from '@matrixai/async-locks'; import { Timer } from '@matrixai/timer'; import { Monitor } from '@matrixai/async-locks'; declare const AsyncFunction: Function; declare const GeneratorFunction: Function; declare const AsyncGeneratorFunction: Function; declare const contexts: WeakMap; declare function getContextIndex(target: any, key: string | symbol, targetName: string): number; declare function checkContextCancellable(ctx: any, key: string | symbol, targetName: string): void; declare function checkContextTimed(ctx: any, key: string | symbol, targetName: string): void; /** * Timer resource * Use it with `withF` or `withG`. */ declare function timer(handlerOrOpts?: ((signal: AbortSignal) => T | PromiseLike) | { handler?: (signal: AbortSignal) => T | PromiseLike; delay?: number; lazy?: boolean; controller?: PromiseCancellableController; }, delay?: number, lazy?: boolean, controller?: PromiseCancellableController): ResourceAcquire>; declare function monitor(lockBox: LockBox, lockConstructor: new () => RWLock, locksPending?: Map): ResourceAcquire>; declare function isPromiseLike(v: any): v is PromiseLike; /** * Is generator object * Use this to check for generators */ declare function isGenerator(v: any): v is Generator; /** * Is async generator object * Use this to check for async generators */ declare function isAsyncGenerator(v: any): v is AsyncGenerator; export { AsyncFunction, GeneratorFunction, AsyncGeneratorFunction, contexts, getContextIndex, checkContextCancellable, checkContextTimed, timer, monitor, isPromiseLike, isGenerator, isAsyncGenerator, };