/**
 * A cache to store the serialized version of an object
 *
 * This is a thin wrapper around WeakMap
 */
export class SerializedCache {
    map = new WeakMap();
    get(obj) {
        return this.map.get(obj);
    }
    set(obj, serialized) {
        this.map.set(obj, serialized);
    }
    clear() {
        this.map = new WeakMap();
    }
}
//# sourceMappingURL=serializedCache.js.map