juniper
Version:
ESM JSON Schema builder for static Typescript inference.
21 lines (20 loc) • 445 B
JavaScript
import { AbstractSchema } from '../lib/schema.js';
export class CustomSchema extends AbstractSchema {
#schema;
constructor(options = {}){
super();
this.#schema = options;
}
static create(schema) {
return new CustomSchema(schema);
}
toJSON() {
return this.toSchema();
}
toSchema() {
return {
...this.#schema
};
}
}
//# sourceMappingURL=custom.js.map