UNPKG

2.52 kBSource Map (JSON)View Raw
1{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/lib/models/reflections/parameter.ts"],"names":[],"mappings":";;AAAA,0CAAsD;AACtD,yCAAkH;AAGlH,MAAa,mBAAoB,SAAQ,qBAAU;IAe/C,QAAQ,CAAC,QAA0B;QAC/B,IAAI,IAAI,CAAC,IAAI,YAAY,sBAAc,EAAE;YACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,2BAAgB,CAAC,WAAW,CAAC,KAAK,KAAK,EAAE;gBACzE,OAAO;aACV;SACJ;QAED,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAMD,QAAQ;QACJ,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEhC,IAAI,IAAI,CAAC,IAAI,EAAE;YACX,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;SACtC;QAED,IAAI,IAAI,CAAC,YAAY,EAAE;YACnB,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC3C;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;IAKD,QAAQ;QACJ,OAAO,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;CACJ;AAjDD,kDAiDC","sourcesContent":["import { Type, ReflectionType } from '../types/index';\nimport { Reflection, DefaultValueContainer, TypeContainer, TraverseCallback, TraverseProperty } from './abstract';\nimport { SignatureReflection } from './signature';\n\nexport class ParameterReflection extends Reflection implements DefaultValueContainer, TypeContainer {\n parent?: SignatureReflection;\n\n defaultValue?: string;\n\n type?: Type;\n\n /**\n * Traverse all potential child reflections of this reflection.\n *\n * The given callback will be invoked for all children, signatures and type parameters\n * attached to this reflection.\n *\n * @param callback The callback function that should be applied for each child reflection.\n */\n traverse(callback: TraverseCallback) {\n if (this.type instanceof ReflectionType) {\n if (callback(this.type.declaration, TraverseProperty.TypeLiteral) === false) {\n return;\n }\n }\n\n super.traverse(callback);\n }\n\n /**\n * Return a raw object representation of this reflection.\n * @deprecated Use serializers instead\n */\n toObject(): any {\n const result = super.toObject();\n\n if (this.type) {\n result.type = this.type.toObject();\n }\n\n if (this.defaultValue) {\n result.defaultValue = this.defaultValue;\n }\n\n return result;\n }\n\n /**\n * Return a string representation of this reflection.\n */\n toString() {\n return super.toString() + (this.type ? ':' + this.type.toString() : '');\n }\n}\n"]}
\No newline at end of file