UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

16 lines 546 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.shimWebAssemblyMemory = void 0; /** * @internal */ function shimWebAssemblyMemory(memory, onGrowCallback) { const grow = memory.grow.bind(memory); memory.grow = (pagesToAdd) => { const previousPageCount = grow(pagesToAdd); onGrowCallback(memory.buffer, previousPageCount, pagesToAdd); return previousPageCount; }; } exports.shimWebAssemblyMemory = shimWebAssemblyMemory; //# sourceMappingURL=shim-web-assembly-memory.js.map