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