Skip to content

Commit

Permalink
Add named exports for main classes
Browse files Browse the repository at this point in the history
  • Loading branch information
benasher44 committed Mar 1, 2024
1 parent 27178f5 commit ac2347f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/2019.ts
Expand Up @@ -10,7 +10,7 @@ import addMetaSchema2019 from "./refs/json-schema-2019-09"

const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema"

class Ajv2019 extends AjvCore {
export class Ajv2019 extends AjvCore {
constructor(opts: Options = {}) {
super({
...opts,
Expand Down Expand Up @@ -44,6 +44,7 @@ class Ajv2019 extends AjvCore {
}

module.exports = exports = Ajv2019
module.exports.Ajv2019 = Ajv2019
Object.defineProperty(exports, "__esModule", {value: true})

export default Ajv2019
Expand Down
3 changes: 2 additions & 1 deletion lib/2020.ts
Expand Up @@ -7,7 +7,7 @@ import addMetaSchema2020 from "./refs/json-schema-2020-12"

const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"

class Ajv2020 extends AjvCore {
export class Ajv2020 extends AjvCore {
constructor(opts: Options = {}) {
super({
...opts,
Expand Down Expand Up @@ -38,6 +38,7 @@ class Ajv2020 extends AjvCore {
}

module.exports = exports = Ajv2020
module.exports.Ajv2020 = Ajv2020
Object.defineProperty(exports, "__esModule", {value: true})

export default Ajv2020
Expand Down
3 changes: 2 additions & 1 deletion lib/ajv.ts
Expand Up @@ -8,7 +8,7 @@ const META_SUPPORT_DATA = ["/properties"]

const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"

class Ajv extends AjvCore {
export class Ajv extends AjvCore {
_addVocabularies(): void {
super._addVocabularies()
draft7Vocabularies.forEach((v) => this.addVocabulary(v))
Expand All @@ -32,6 +32,7 @@ class Ajv extends AjvCore {
}

module.exports = exports = Ajv
module.exports.Ajv = Ajv
Object.defineProperty(exports, "__esModule", {value: true})

export default Ajv
Expand Down
3 changes: 2 additions & 1 deletion lib/jtd.ts
Expand Up @@ -35,7 +35,7 @@ type JTDOptions = CurrentOptions & {
multipleOfPrecision?: never
}

class Ajv extends AjvCore {
export class Ajv extends AjvCore {
constructor(opts: JTDOptions = {}) {
super({
...opts,
Expand Down Expand Up @@ -93,6 +93,7 @@ class Ajv extends AjvCore {
}

module.exports = exports = Ajv
module.exports.Ajv = Ajv
Object.defineProperty(exports, "__esModule", {value: true})

export default Ajv
Expand Down

0 comments on commit ac2347f

Please sign in to comment.