@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
31 lines (27 loc) • 1.25 kB
JavaScript
import { __decorateMetadata } from "../../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
import { BaseRecord } from "../../../storage/BaseRecord.mjs";
import { uuid } from "../../../utils/uuid.mjs";
import { Type } from "class-transformer";
//#region src/modules/cache/singleContextLruCache/SingleContextLruCacheRecord.ts
var _ref;
var SingleContextLruCacheRecord = class SingleContextLruCacheRecord extends BaseRecord {
constructor(props) {
super();
this.type = SingleContextLruCacheRecord.type;
if (props) {
this.id = props.id ?? uuid();
this.createdAt = props.createdAt ?? /* @__PURE__ */ new Date();
this.entries = props.entries;
this._tags = props.tags ?? {};
}
}
getTags() {
return { ...this._tags };
}
};
SingleContextLruCacheRecord.type = "SingleContextLruCacheRecord";
__decorate([Type(() => Object), __decorateMetadata("design:type", typeof (_ref = typeof Map !== "undefined" && Map) === "function" ? _ref : Object)], SingleContextLruCacheRecord.prototype, "entries", void 0);
//#endregion
export { SingleContextLruCacheRecord };
//# sourceMappingURL=SingleContextLruCacheRecord.mjs.map