2.23 kBSource Map (JSON)View Raw
1{"version":3,"file":"intrinsic.js","sourceRoot":"","sources":["../../../../src/lib/models/types/intrinsic.ts"],"names":[],"mappings":";;AAAA,yCAAkC;AASlC,MAAa,aAAc,SAAQ,eAAI;IAgBnC,YAAY,IAAY;QACpB,KAAK,EAAE,CAAC;QARH,SAAI,GAAW,WAAW,CAAC;QAShC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAOD,KAAK;QACD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAQD,MAAM,CAAC,IAAmB;QACtB,OAAO,IAAI,YAAY,aAAa;YAChC,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,sCAyDC","sourcesContent":["import { Type } from './abstract';\n\n/**\n * Represents an intrinsic type like `string` or `boolean`.\n *\n * ~~~\n * let value: number;\n * ~~~\n */\nexport class IntrinsicType extends Type {\n /**\n * The name of the intrinsic type like `string` or `boolean`.\n */\n name: string;\n\n /**\n * The type name identifier.\n */\n readonly type: string = 'intrinsic';\n\n /**\n * Create a new instance of IntrinsicType.\n *\n * @param name The name of the intrinsic type like `string` or `boolean`.\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 IntrinsicType(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: IntrinsicType): boolean {\n return type instanceof IntrinsicType &&\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