UNPKG

@tsed/schema

Version:
18 lines (17 loc) 432 B
import { nameOf } from "@tsed/core"; import { getJsonEntityStore } from "../utils/getJsonEntityStore.js"; export class JsonLazyRef { constructor(getType) { this.getType = getType; this.isLazyRef = true; } get target() { return this.getType(); } get schema() { return getJsonEntityStore(this.getType()).schema; } get name() { return nameOf(this.getType()); } }