UNPKG

@metamask/ocap-kernel

Version:
24 lines 945 B
import type { KRef } from "../../types.mjs"; import type { StoreContext } from "../types.mjs"; /** * Create a refcount store object that provides functionality for managing reference counts. * * @param ctx - The store context. * @returns A refcount store object that maps various persistent kernel data * structures onto `kv`. */ export declare function getRefCountMethods(ctx: StoreContext): { getRefCount: (kref: KRef) => number; kernelRefExists: (kref: KRef) => boolean; incRefCount: (kref: KRef) => number; decRefCount: (kref: KRef) => number; incrementRefCount: (kref: KRef, tag: string, { isExport, onlyRecognizable, }?: { isExport?: boolean; onlyRecognizable?: boolean; }) => void; decrementRefCount: (kref: KRef, tag: string, { isExport, onlyRecognizable, }?: { isExport?: boolean; onlyRecognizable?: boolean; }) => boolean; }; //# sourceMappingURL=refcount.d.mts.map