1 | var __extends = (this && this.__extends) || (function () {
|
2 | var extendStatics = function (d, b) {
|
3 | extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return extendStatics(d, b);
|
7 | };
|
8 | return function (d, b) {
|
9 | extendStatics(d, b);
|
10 | function __() { this.constructor = d; }
|
11 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
12 | };
|
13 | })();
|
14 | import { DocNodeKind, DocNode } from './DocNode';
|
15 | import { DocExcerpt, ExcerptKind } from './DocExcerpt';
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | var DocErrorText = (function (_super) {
|
21 | __extends(DocErrorText, _super);
|
22 | |
23 |
|
24 |
|
25 |
|
26 | function DocErrorText(parameters) {
|
27 | var _this = _super.call(this, parameters) || this;
|
28 | _this._textExcerpt = new DocExcerpt({
|
29 | configuration: _this.configuration,
|
30 | excerptKind: ExcerptKind.ErrorText,
|
31 | content: parameters.textExcerpt
|
32 | });
|
33 | _this._messageId = parameters.messageId;
|
34 | _this._errorMessage = parameters.errorMessage;
|
35 | _this._errorLocation = parameters.errorLocation;
|
36 | return _this;
|
37 | }
|
38 | Object.defineProperty(DocErrorText.prototype, "kind", {
|
39 |
|
40 | get: function () {
|
41 | return DocNodeKind.ErrorText;
|
42 | },
|
43 | enumerable: false,
|
44 | configurable: true
|
45 | });
|
46 | Object.defineProperty(DocErrorText.prototype, "text", {
|
47 | |
48 |
|
49 |
|
50 |
|
51 | get: function () {
|
52 | if (this._text === undefined) {
|
53 | this._text = this._textExcerpt.content.toString();
|
54 | }
|
55 | return this._text;
|
56 | },
|
57 | enumerable: false,
|
58 | configurable: true
|
59 | });
|
60 | Object.defineProperty(DocErrorText.prototype, "textExcerpt", {
|
61 | get: function () {
|
62 | if (this._textExcerpt) {
|
63 | return this._textExcerpt.content;
|
64 | }
|
65 | else {
|
66 | return undefined;
|
67 | }
|
68 | },
|
69 | enumerable: false,
|
70 | configurable: true
|
71 | });
|
72 | Object.defineProperty(DocErrorText.prototype, "messageId", {
|
73 | |
74 |
|
75 |
|
76 | get: function () {
|
77 | return this._messageId;
|
78 | },
|
79 | enumerable: false,
|
80 | configurable: true
|
81 | });
|
82 | Object.defineProperty(DocErrorText.prototype, "errorMessage", {
|
83 | |
84 |
|
85 |
|
86 | get: function () {
|
87 | return this._errorMessage;
|
88 | },
|
89 | enumerable: false,
|
90 | configurable: true
|
91 | });
|
92 | Object.defineProperty(DocErrorText.prototype, "errorLocation", {
|
93 | |
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 | get: function () {
|
103 | return this._errorLocation;
|
104 | },
|
105 | enumerable: false,
|
106 | configurable: true
|
107 | });
|
108 |
|
109 | DocErrorText.prototype.onGetChildNodes = function () {
|
110 | return [this._textExcerpt];
|
111 | };
|
112 | return DocErrorText;
|
113 | }(DocNode));
|
114 | export { DocErrorText };
|
115 |
|
\ | No newline at end of file |