1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const abstract_1 = require("./abstract");
|
4 | class ReflectionType extends abstract_1.Type {
|
5 | constructor(declaration) {
|
6 | super();
|
7 | this.type = 'reflection';
|
8 | this.declaration = declaration;
|
9 | }
|
10 | clone() {
|
11 | return new ReflectionType(this.declaration);
|
12 | }
|
13 | equals(type) {
|
14 | return type === this;
|
15 | }
|
16 | toObject() {
|
17 | const result = super.toObject();
|
18 | if (this.declaration) {
|
19 | result.declaration = this.declaration.toObject();
|
20 | }
|
21 | return result;
|
22 | }
|
23 | toString() {
|
24 | if (!this.declaration.children && this.declaration.signatures) {
|
25 | return 'function';
|
26 | }
|
27 | else {
|
28 | return 'object';
|
29 | }
|
30 | }
|
31 | }
|
32 | exports.ReflectionType = ReflectionType;
|
33 |
|
\ | No newline at end of file |