/** * type builder interface * * @interface */ class BaseType { constructor () { this._type = 'base' this._required = false } required () { this._required = true return this } /** * validate data * @param {any} value * @return {string?} */ validate (value) { throw new Error('not impl') } } module.exports = BaseType