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.

24 lines 655 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DebugWeakStore = void 0; const _debug_js_1 = require("./_debug.js"); /** * @public */ class DebugWeakStore { constructor(values = new WeakMap()) { this.values = values; } setValue(key, value) { this.values.set(key, value); } deleteValue(key) { this.values.delete(key); } getValue(key) { _BUILD.DEBUG && _debug_js_1._Debug.assert(this.values.has(key), "expected to find value"); return this.values.get(key); } } exports.DebugWeakStore = DebugWeakStore; //# sourceMappingURL=debug-weak-store.js.map