import type { Mortice, MorticeOptions } from './index.js'; import type { TypedEventTarget } from 'main-event'; export type RequestType = 'requestReadLock' | 'requestWriteLock'; export type AbortRequestType = 'abortReadLockRequest' | 'abortWriteLockRequest'; export type FinalizeRequestType = 'finalizeRequest'; export interface RequestEventData { name: string; identifier: string; handler(): Promise; onError(err: Error): void; } export interface RequestEvent { type: string; identifier: string; name: string; error?: { name: string; message: string; stack: string; }; } export interface AbortEventData { name: string; identifier: string; } export interface FinalizeEventData { name: string; } export interface MorticeEvents { requestReadLock: CustomEvent; abortReadLockRequest: CustomEvent; requestWriteLock: CustomEvent; abortWriteLockRequest: CustomEvent; finalizeRequest: CustomEvent; } export declare function isMortice(obj?: any): obj is Mortice; export declare function getImplementation(opts: Required): Mortice | TypedEventTarget; export declare const createMutex: (name: string, options: Required) => Mortice; //# sourceMappingURL=mortice.d.ts.map