UNPKG

lifecycle-utils

Version:

A set of general utilities for the lifecycle of a JS/TS project/library

13 lines 480 B
/** * An object that provides an async `.dispose()` method that can called only once. * * Calling `.dispose()` will call the provided `onDispose` function only once. * Any subsequent calls to `.dispose()` will do nothing. */ export declare class AsyncDisposableHandle { constructor(onDispose: () => Promise<void>); get disposed(): boolean; [Symbol.asyncDispose](): Promise<void>; dispose(): Promise<void>; } //# sourceMappingURL=AsyncDisposableHandle.d.ts.map