mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1769] Added JSDocs and methods and updated script (#2927)
This commit is contained in:
committed by
Eugenio Romano
parent
2bfed5818f
commit
76ad797488
@@ -27,7 +27,8 @@ var ParamData = /** @class */ (function () {
|
||||
var sig = this.name;
|
||||
if (this.optional)
|
||||
sig += "?";
|
||||
sig += ": " + this.type;
|
||||
if (this.type)
|
||||
sig += ": " + this.type;
|
||||
if (this.initializer)
|
||||
sig += " = " + this.initializer;
|
||||
return sig;
|
||||
@@ -134,6 +135,8 @@ var ServiceDocAutoContent = /** @class */ (function () {
|
||||
var methData = new MethodData();
|
||||
methData.name = memSymbol.getName();
|
||||
var doc = ts.displayPartsToString(memSymbol.getDocumentationComment());
|
||||
if (!doc)
|
||||
console.log("Warning: Method " + classDec.name.escapedText + "." + methData.name + " is not documented");
|
||||
methData.docText = doc.replace(/\r\n/g, " ");
|
||||
var sig = checker.getSignatureFromDeclaration(method);
|
||||
var returnType = sig.getReturnType();
|
||||
@@ -143,9 +146,14 @@ var ServiceDocAutoContent = /** @class */ (function () {
|
||||
for (var p = 0; p < params.length; p++) {
|
||||
var pData = new ParamData();
|
||||
pData.name = params[p].name.getText();
|
||||
pData.type = params[p].type.getText();
|
||||
if (params[p].type)
|
||||
pData.type = params[p].type.getText();
|
||||
else
|
||||
pData.type = "";
|
||||
var paramSymbol = checker.getSymbolAtLocation(params[p].name);
|
||||
pData.docText = ts.displayPartsToString(paramSymbol.getDocumentationComment());
|
||||
if (!pData.docText)
|
||||
console.log("Warning: Parameter \"" + pData.name + "\" of " + classDec.name.escapedText + "." + methData.name + " is not documented");
|
||||
pData.optional = params[p].questionToken ? true : false;
|
||||
if (params[p].initializer) {
|
||||
var initText = params[p].initializer.getText();
|
||||
|
Reference in New Issue
Block a user