UNPKG

ts-json-schema-generator

Version:

Generate JSON schema from your Typescript sources

16 lines (12 loc) 347 B
import { BaseType } from "./BaseType.js"; export class IntersectionType extends BaseType { public constructor(private types: BaseType[]) { super(); } public getId(): string { return `(${this.types.map((type) => type.getId()).join("&")})`; } public getTypes(): BaseType[] { return this.types; } }