import { Type } from "./type"; import { IType } from "./itype"; export class MultiType implements IType { constructor (public types: Type[]) { } get value () { return null; } get ord () { return null; } stringInfo () { let list: any[] = []; for (let i = 0; i < this.types.length; i++) { const t = this.types[i]; list = list.concat(t.stringInfo()); } return list; } isCompatible (another: Type) { for (let i = 0; i < this.types.length; i++) { const t = this.types[i]; if (another.isCompatible(t)) { return true; } } return false; } }