const RUNTIME_IMAGE = Symbol.for('bilig.runtimeImage');
const RUNTIME_SNAPSHOT = Symbol.for('bilig.runtimeSnapshot');
export function attachRuntimeImage(carrier, runtimeImage) {
    Object.defineProperty(carrier, RUNTIME_IMAGE, {
        value: runtimeImage,
        configurable: true,
        enumerable: false,
        writable: true,
    });
    return carrier;
}
export function readRuntimeImage(carrier) {
    if (!carrier || typeof carrier !== 'object') {
        return undefined;
    }
    return carrier[RUNTIME_IMAGE];
}
export function attachRuntimeSnapshot(carrier, snapshot) {
    Object.defineProperty(carrier, RUNTIME_SNAPSHOT, {
        value: snapshot,
        configurable: true,
        enumerable: false,
        writable: true,
    });
    return carrier;
}
export function readRuntimeSnapshot(carrier) {
    if (!carrier || typeof carrier !== 'object') {
        return undefined;
    }
    return carrier[RUNTIME_SNAPSHOT];
}
//# sourceMappingURL=runtime-image-codec.js.map