Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break;
case ApiItemKind.Class:
yamlItem.type = 'class';
this._populateYamlClassOrInterface(yamlItem, apiItem as ApiClass);
break;
case ApiItemKind.Interface:
yamlItem.type = 'interface';
this._populateYamlClassOrInterface(yamlItem, apiItem as ApiInterface);
break;
case ApiItemKind.Method:
case ApiItemKind.MethodSignature:
yamlItem.type = 'method';
this._populateYamlFunctionLike(yamlItem, apiItem as ApiMethod | ApiMethodSignature);
break;
case ApiItemKind.Constructor:
yamlItem.type = 'constructor';
this._populateYamlFunctionLike(yamlItem, apiItem as ApiConstructor);
break;
case ApiItemKind.Package:
yamlItem.type = 'package';
break;
case ApiItemKind.Property:
case ApiItemKind.PropertySignature:
const apiProperty: ApiPropertyItem = apiItem as ApiPropertyItem;
if (apiProperty.isEventProperty) {
yamlItem.type = 'event';
} else {
yamlItem.type = 'property';
}
this._populateYamlProperty(yamlItem, apiProperty);
const constructorsTable: DocTable = new DocTable({ configuration,
headerTitles: [ 'Constructor', 'Modifiers', 'Description' ]
});
const propertiesTable: DocTable = new DocTable({ configuration,
headerTitles: [ 'Property', 'Modifiers', 'Type', 'Description' ]
});
const methodsTable: DocTable = new DocTable({ configuration,
headerTitles: [ 'Method', 'Modifiers', 'Description' ]
});
for (const apiMember of apiClass.members) {
switch (apiMember.kind) {
case ApiItemKind.Constructor: {
constructorsTable.addRow(
new DocTableRow({ configuration }, [
this._createTitleCell(apiMember),
this._createModifiersCell(apiMember),
this._createDescriptionCell(apiMember)
])
);
this._writeApiItemPage(apiMember);
break;
}
case ApiItemKind.Method: {
methodsTable.addRow(
new DocTableRow({ configuration }, [
this._createTitleCell(apiMember),
this._createModifiersCell(apiMember),
kind: 'Method'
};
tableRowJson.typeTokens = getTokenHyperlinks(collectedData, apiMethod.excerptTokens, apiMethod.excerpt.tokenRange);
if (apiMethod.tsdocComment) {
if (apiMethod.tsdocComment.deprecatedBlock) {
tableRowJson.deprecated = true;
}
tableRowJson.description += renderDocNodeWithoutInlineTag(apiMethod.tsdocComment.summarySection);
}
classTableRowJson.push(tableRowJson);
break;
}
case ApiItemKind.Constructor: {
break;
}
}
}
tableJson.members = classTableRowJson;
return tableJson;
}