2.17 kBSource Map (JSON)View Raw
1{"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../../../src/lib/models/types/unknown.ts"],"names":[],"mappings":";;AAAA,yCAAkC;AAKlC,MAAa,WAAY,SAAQ,eAAI;IAgBjC,YAAY,IAAY;QACpB,KAAK,EAAE,CAAC;QARH,SAAI,GAAW,SAAS,CAAC;QAS9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAOD,KAAK;QACD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAQD,MAAM,CAAC,IAAiB;QACpB,OAAO,IAAI,YAAY,WAAW;YAC9B,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAChC,CAAC;IAMD,QAAQ;QACJ,MAAM,MAAM,GAAQ,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,OAAO,MAAM,CAAC;IAClB,CAAC;IAKD,QAAQ;QACJ,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ;AAzDD,kCAyDC","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents all unknown types.\n */\nexport class UnknownType extends Type {\n /**\n * A string representation of the type as returned from TypeScript compiler.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'unknown';\n\n /**\n * Create a new instance of UnknownType.\n *\n * @param name A string representation of the type as returned from TypeScript compiler.\n */\n constructor(name: string) {\n super();\n this.name = name;\n }\n\n /**\n * Clone this type.\n *\n * @return A clone of this type.\n */\n clone(): Type {\n return new UnknownType(this.name);\n }\n\n /**\n * Test whether this type equals the given type.\n *\n * @param type The type that should be checked for equality.\n * @returns TRUE if the given type equals this type, FALSE otherwise.\n */\n equals(type: UnknownType): boolean {\n return type instanceof UnknownType &&\n type.name === this.name;\n }\n\n /**\n * Return a raw object representation of this type.\n * @deprecated Use serializers instead\n */\n toObject(): any {\n const result: any = super.toObject();\n result.name = this.name;\n return result;\n }\n\n /**\n * Return a string representation of this type.\n */\n toString() {\n return this.name;\n }\n}\n"]}
\No newline at end of file