import { type IManagedObject, type IOnFreeListener, type IPointer } from "../../lifecycle/manged-resources.js";
import type { IDebugProtectedViewFactory } from "../../debug/i-debug-protected-view-factory.js";
import type { IEmscriptenWrapper } from "../emscripten/i-emscripten-wrapper.js";
import type { IInteropBindings } from "../emscripten/i-interop-bindings.js";
/**
 * @public
 * Defines the cleanup behavior of {@link SharedObjectCleanup}
 */
export declare enum ESharedObjectOwnerKind {
    NotOwning = 1,
    SharedMemoryOwner = 2,
    Freeable = 3
}
/**
 * @public
 *
 * Provides reasonable defaults for cleaning up a handle to a `JsInterop::ASharedMemoryObject`.
 */
export declare class SharedObjectCleanup implements IOnFreeListener {
    protected readonly ownershipKind: ESharedObjectOwnerKind;
    static Options: {
        new (debugName: string, protectedView: IDebugProtectedViewFactory | null, ownershipKind: ESharedObjectOwnerKind): {
            readonly debugName: string;
            readonly protectedView: IDebugProtectedViewFactory | null;
            readonly ownershipKind: ESharedObjectOwnerKind;
        };
    };
    readonly wrapper: IEmscriptenWrapper<IInteropBindings>;
    readonly ptr: number;
    static createWithCleanup(sharedObject: IManagedObject & IPointer, options: InstanceType<typeof SharedObjectCleanup.Options>): SharedObjectCleanup;
    static registerCleanup(sharedObject: IManagedObject & IPointer, cleanup: SharedObjectCleanup, options: InstanceType<typeof SharedObjectCleanup.Options>): void;
    constructor(sharedObject: IManagedObject & IPointer, ownershipKind: ESharedObjectOwnerKind);
    onFree(): void;
}
//# sourceMappingURL=shared-object-cleanup.d.ts.map