UNPKG

@microsoft/api-extractor

Version:

Validate, document, and review the exported API for a TypeScript library

37 lines (36 loc) 1.35 kB
import AstItem, { AstItemKind } from './ast/AstItem'; import { ReleaseTag } from './aedoc/ReleaseTag'; import { MarkupElement, MarkupBasicElement } from './markup/MarkupElement'; import { ApiItem } from './api/ApiItem'; import { IAedocParameter } from './aedoc/ApiDocumentation'; /** * A class to abstract away the difference between an item from our public API that could be * represented by either an AstItem or an ApiItem that is retrieved from a JSON file. */ export default class ResolvedApiItem { kind: AstItemKind; summary: MarkupElement[]; remarks: MarkupElement[]; deprecatedMessage: MarkupBasicElement[] | undefined; releaseTag: ReleaseTag; isBeta: boolean; params: { [name: string]: IAedocParameter; } | undefined; returnsMessage: MarkupBasicElement[] | undefined; /** * This property will either be an AstItem or undefined. */ astItem: AstItem | undefined; /** * A function to abstract the construction of a ResolvedApiItem instance * from an AstItem. */ static createFromAstItem(astItem: AstItem): ResolvedApiItem; /** * A function to abstract the construction of a ResolvedApiItem instance * from a JSON object that symbolizes an ApiItem. */ static createFromJson(docItem: ApiItem): ResolvedApiItem; private constructor(); }