1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const index_1 = require("../types/index");
|
4 | const abstract_1 = require("./abstract");
|
5 | class 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 | }
|
28 | exports.ParameterReflection = ParameterReflection;
|
29 |
|
\ | No newline at end of file |