Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const remarks = this._renderMarkdown(tsdocComment.remarksBlock.content, apiItem);
if (remarks) {
yamlItem.remarks = remarks;
}
}
if (tsdocComment.deprecatedBlock) {
// @ts-ignore
const deprecatedMessage = this._renderMarkdown(tsdocComment.deprecatedBlock.content, apiItem);
if (deprecatedMessage.length > 0) {
yamlItem.deprecated = { content: deprecatedMessage };
}
}
}
if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {
if (apiItem.releaseTag === 3) {
yamlItem.isPreview = true;
}
}
yamlItem.name = this._getYamlItemName(apiItem);
yamlItem.fullName = yamlItem.name;
yamlItem.langs = ['typeScript'];
switch (apiItem.kind) {
case "Enum":
yamlItem.type = 'enum';
break;
case "EnumMember":
yamlItem.type = 'field';
const enumMember = /** @type {ApiEnumMember} */(apiItem);
break;
case ApiItemKind.Property:
case ApiItemKind.PropertySignature:
output.appendNode(new DocHeading({ configuration, title: `${scopedName} property` }));
break;
case ApiItemKind.TypeAlias:
output.appendNode(new DocHeading({ configuration, title: `${scopedName} type` }));
break;
case ApiItemKind.Variable:
output.appendNode(new DocHeading({ configuration, title: `${scopedName} variable` }));
break;
default:
throw new Error('Unsupported API item kind: ' + apiItem.kind);
}
if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {
if (apiItem.releaseTag === ReleaseTag.Beta) {
this._writeBetaWarning(output);
}
}
if (apiItem instanceof ApiDocumentedItem) {
const tsdocComment: DocComment | undefined = apiItem.tsdocComment;
if (tsdocComment) {
if (tsdocComment.deprecatedBlock) {
output.appendNode(
new DocNoteBox({ configuration: this._tsdocConfiguration },
[
new DocParagraph({ configuration: this._tsdocConfiguration }, [
new DocPlainText({
private _createDescriptionCell(apiItem: ApiItem): DocTableCell {
const configuration: TSDocConfiguration = this._tsdocConfiguration;
const section: DocSection = new DocSection({ configuration });
if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {
if (apiItem.releaseTag === ReleaseTag.Beta) {
section.appendNodesInParagraph([
new DocEmphasisSpan({ configuration, bold: true, italic: true }, [
new DocPlainText({ configuration, text: '(BETA)' })
]),
new DocPlainText({ configuration, text: ' ' })
]);
}
}
if (apiItem instanceof ApiDocumentedItem) {
if (apiItem.tsdocComment !== undefined) {
this._appendAndMergeSection(section, apiItem.tsdocComment.summarySection);
}
}
if (tsdocComment.remarksBlock) {
const remarks: string = this._renderMarkdown(tsdocComment.remarksBlock.content, apiItem);
if (remarks) {
yamlItem.remarks = remarks;
}
}
if (tsdocComment.deprecatedBlock) {
const deprecatedMessage: string = this._renderMarkdown(tsdocComment.deprecatedBlock.content, apiItem);
if (deprecatedMessage.length > 0) {
yamlItem.deprecated = { content: deprecatedMessage };
}
}
}
if (ApiReleaseTagMixin.isBaseClassOf(apiItem)) {
if (apiItem.releaseTag === ReleaseTag.Beta) {
yamlItem.isPreview = true;
}
}
yamlItem.name = this._getYamlItemName(apiItem);
yamlItem.fullName = yamlItem.name;
yamlItem.langs = ['typeScript'];
switch (apiItem.kind) {
case ApiItemKind.Enum:
yamlItem.type = 'enum';
break;
case ApiItemKind.EnumMember:
yamlItem.type = 'field';