UNPKG

954 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const index_1 = require("../types/index");
4const abstract_1 = require("./abstract");
5class ParameterReflection extends abstract_1.Reflection {
6 traverse(callback) {
7 if (this.type instanceof index_1.ReflectionType) {
8 if (callback(this.type.declaration, abstract_1.TraverseProperty.TypeLiteral) === false) {
9 return;
10 }
11 }
12 super.traverse(callback);
13 }
14 toObject() {
15 const result = super.toObject();
16 if (this.type) {
17 result.type = this.type.toObject();
18 }
19 if (this.defaultValue) {
20 result.defaultValue = this.defaultValue;
21 }
22 return result;
23 }
24 toString() {
25 return super.toString() + (this.type ? ':' + this.type.toString() : '');
26 }
27}
28exports.ParameterReflection = ParameterReflection;
29//# sourceMappingURL=parameter.js.map
\No newline at end of file