@jsonjoy.com/json-type
Version:
High-performance JSON Pointer implementation
27 lines • 834 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RefType = void 0;
const tslib_1 = require("tslib");
const schema = tslib_1.__importStar(require("../../schema"));
const AbsType_1 = require("./AbsType");
class RefType extends AbsType_1.AbsType {
constructor(ref) {
super(schema.s.Ref(ref));
}
ref() {
return this.schema.ref;
}
getOptions() {
const { kind: _, ref: __, ...options } = this.schema;
return options;
}
resolve() {
return this.getSystem().resolve(this.ref()).type;
}
toStringTitle(tab = '') {
const options = this.toStringOptions();
return `${super.toStringTitle()} → [${this.schema.ref}]` + (options ? ` ${options}` : '');
}
}
exports.RefType = RefType;
//# sourceMappingURL=RefType.js.map