(opts: Options = {})
| 292 | static MissingRefError = MissingRefError |
| 293 | |
| 294 | constructor(opts: Options = {}) { |
| 295 | opts = this.opts = {...opts, ...requiredOptions(opts)} |
| 296 | const {es5, lines} = this.opts.code |
| 297 | |
| 298 | this.scope = new ValueScope({scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines}) |
| 299 | this.logger = getLogger(opts.logger) |
| 300 | const formatOpt = opts.validateFormats |
| 301 | opts.validateFormats = false |
| 302 | |
| 303 | this.RULES = getRules() |
| 304 | checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED") |
| 305 | checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn") |
| 306 | this._metaOpts = getMetaSchemaOptions.call(this) |
| 307 | |
| 308 | if (opts.formats) addInitialFormats.call(this) |
| 309 | this._addVocabularies() |
| 310 | this._addDefaultMetaSchema() |
| 311 | if (opts.keywords) addInitialKeywords.call(this, opts.keywords) |
| 312 | if (typeof opts.meta == "object") this.addMetaSchema(opts.meta) |
| 313 | addInitialSchemas.call(this) |
| 314 | opts.validateFormats = formatOpt |
| 315 | } |
| 316 | |
| 317 | _addVocabularies(): void { |
| 318 | this.addKeyword("$async") |
nothing calls this directly
no test coverage detected