import { AniraWasmInstance } from '../factory';
/** Accepts either a raw WASM pointer or a wrapper instance. */
export type PossiblePointer<T extends BaseWrapper = BaseWrapper> = T | number;
/** Resolve a `PossiblePointer` to a raw numeric pointer. */
export declare const resolvePtr: (value: PossiblePointer) => number;
export declare abstract class BaseWrapper {
    protected ptr: number;
    protected wasmInstance: AniraWasmInstance;
    constructor(module: AniraWasmInstance, ptr: PossiblePointer);
    getPointer(): number;
    /**
     * Wrap a raw WASM pointer as an instance of a wrapper class,
     * reusing this instance's wasmInstance.
     */
    wrapPointer<T extends BaseWrapper>(Cls: new (wasmInstance: AniraWasmInstance, ...args: any[]) => T, ptr: number): T;
    /** Free the underlying C++ object. See :ref:`lifecycle-and-cleanup` for when to call this. */
    abstract destroy(): void;
    static createFromPointer<T extends BaseWrapper>(this: new (module: AniraWasmInstance, ptr: number) => T, module: AniraWasmInstance, ptr: number): T;
    protected _destroy(func: (ptr: number) => void): void;
}
//# sourceMappingURL=BaseWrapper.d.ts.map