mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2979] Updated doc tools to avoid erasing MD docs with blank JSDocs in services (#3347)
* [ADF-2979] Update to ignore blank JSDocs for method signature * [ADF-2979] Finished adding blank JSDoc check for services
This commit is contained in:
committed by
Eugenio Romano
parent
592ad185e7
commit
73bc62ae8f
@@ -26,6 +26,34 @@ var MDNav = /** @class */ (function () {
|
||||
}
|
||||
return new MDNav(this.root, this.root.children.length);
|
||||
};
|
||||
MDNav.prototype.findAll = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
if (!this.root || !this.root.children) {
|
||||
return [];
|
||||
}
|
||||
var result = [];
|
||||
var currIndex = 0;
|
||||
for (var i = this.pos; i < this.root.children.length; i++) {
|
||||
var child = this.root.children[i];
|
||||
if (test(child)) {
|
||||
if (currIndex === index) {
|
||||
result.push(new MDNav(this.root, i));
|
||||
}
|
||||
else {
|
||||
currIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
MDNav.prototype.emph = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "emphasis" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.heading = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
@@ -33,6 +61,48 @@ var MDNav = /** @class */ (function () {
|
||||
return h.type === "heading" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.html = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "html" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.list = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "list" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.listItem = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "listItem" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.listItems = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.findAll(function (h) {
|
||||
return h.type === "listItem" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.paragraph = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "paragraph" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.strong = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "strong" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.table = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
@@ -40,13 +110,6 @@ var MDNav = /** @class */ (function () {
|
||||
return h.type === "table" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.text = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "text" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.tableRow = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
@@ -61,6 +124,13 @@ var MDNav = /** @class */ (function () {
|
||||
return h.type === "tableCell" && test(h);
|
||||
}, index);
|
||||
};
|
||||
MDNav.prototype.text = function (test, index) {
|
||||
if (test === void 0) { test = function () { return true; }; }
|
||||
if (index === void 0) { index = 0; }
|
||||
return this.find(function (h) {
|
||||
return h.type === "text" && test(h);
|
||||
}, index);
|
||||
};
|
||||
Object.defineProperty(MDNav.prototype, "item", {
|
||||
get: function () {
|
||||
if (!this.root || !this.root.children) {
|
||||
@@ -89,6 +159,18 @@ var MDNav = /** @class */ (function () {
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
Object.defineProperty(MDNav.prototype, "value", {
|
||||
get: function () {
|
||||
if (this.item && this.item["value"]) {
|
||||
return this.item.value;
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
return MDNav;
|
||||
}());
|
||||
exports.MDNav = MDNav;
|
||||
|
Reference in New Issue
Block a user