/** * Shared memory. * * @module memory * @license Apache-2.0 * @copyright Mat. 2018-present */ import type { JSAnyObj } from "@xcmats/js-toolbox/type"; /** * Invoke function argument with a reference to shared memory. * * @function useMemory * @param f function to invoke on a shared memory * @returns {*} */ export declare function useMemory(f?: (x: T) => T): T; /** * Extend shared memory with keys from provided extension object. * It throws when shared memory already have those keys. * * @function share * @param ext extension object * @returns extended memory object */ export declare function share(ext: T): T;