@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
18 lines (17 loc) • 432 B
JavaScript
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());
}
}