How to use the @microsoft/api-extractor-model.ApiItemKind.Interface function in @microsoft/api-extractor-model

To help you get started, we’ve selected a few @microsoft/api-extractor-model examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / rushstack / apps / api-documenter / src / documenters / YamlDocumenter.ts View on Github external
private _initApiItemsByTypeNameRecursive(apiItem: ApiItem, ambiguousNames: Set): void {
    switch (apiItem.kind) {
      case ApiItemKind.Class:
      case ApiItemKind.Enum:
      case ApiItemKind.Interface:
        // Attempt to register both the fully qualified name and the short name
        const namesForType: string[] = [apiItem.displayName];

        // Note that nameWithDot cannot conflict with apiItem.name (because apiItem.name
        // cannot contain a dot)
        const nameWithDot: string | undefined = this._getTypeNameWithDot(apiItem);
        if (nameWithDot) {
          namesForType.push(nameWithDot);
        }

        // Register all names
        for (const typeName of namesForType) {
          if (ambiguousNames.has(typeName)) {
            break;
          }
github OfficeDev / office-ui-fabric-react / packages / api-docs / src / PageJsonGenerator.tsx View on Github external
function collectPageData(collectedData: CollectedData, apiItem: ApiItem, kind: PageKind): void {
  if (apiItem instanceof ApiDocumentedItem) {
    switch (apiItem.kind) {
      case ApiItemKind.Interface:
      case ApiItemKind.Enum:
      case ApiItemKind.Class:
      case ApiItemKind.TypeAlias: {
        console.log('Analyzing ' + apiItem.displayName);

        if (apiItem.tsdocComment !== undefined) {
          const docCategoryTag: DocInlineTag | undefined = findInlineTagByName('@docCategory', apiItem.tsdocComment);

          if (docCategoryTag !== undefined) {
            const pageName: string = docCategoryTag.tagContent.trim();
            let pageData: PageData | undefined = collectedData.pageDataByPageName.get(pageName);

            if (pageData === undefined) {
              collectedData.pageDataByPageName.set(pageName, new PageData(pageName, 'References'));
              pageData = collectedData.pageDataByPageName.get(pageName);
              collectedData.apiToPage.set(apiItem.displayName, { pageName, kind: 'References' });
github microsoft / rushstack / apps / api-documenter / src / documenters / MarkdownDocumenter.ts View on Github external
new DocParagraph({ configuration }, [
            new DocEmphasisSpan({ configuration, bold: true}, [
              new DocPlainText({ configuration, text: 'Signature:' })
            ])
          ])
        );
        output.appendNode(
          new DocFencedCode({ configuration, code: apiItem.getExcerptWithModifiers(), language: 'typescript' })
        );
      }
    }

    let appendRemarks: boolean = true;
    switch (apiItem.kind) {
      case ApiItemKind.Class:
      case ApiItemKind.Interface:
      case ApiItemKind.Namespace:
      case ApiItemKind.Package:
        this._writeRemarksSection(output, apiItem);
        appendRemarks = false;
        break;
    }

    switch (apiItem.kind) {
      case ApiItemKind.Class:
        this._writeClassTables(output, apiItem as ApiClass);
        break;
      case ApiItemKind.Enum:
        this._writeEnumTables(output, apiItem as ApiEnum);
        break;
      case ApiItemKind.Interface:
        this._writeInterfaceTables(output, apiItem as ApiInterface);
github ifiokjr / remirror / @remirror / api-documenter / src / documenters / markdown-documenter.ts View on Github external
this._createTitleCell(apiMember),
        this._createDescriptionCell(apiMember),
      ]);

      switch (apiMember.kind) {
        case ApiItemKind.Class:
          classesTable.addRow(row);
          this._writeApiItemPage(apiMember);
          break;

        case ApiItemKind.Enum:
          enumerationsTable.addRow(row);
          this._writeApiItemPage(apiMember);
          break;

        case ApiItemKind.Interface:
          interfacesTable.addRow(row);
          this._writeApiItemPage(apiMember);
          break;

        case ApiItemKind.Namespace:
          namespacesTable.addRow(row);
          this._writeApiItemPage(apiMember);
          break;

        case ApiItemKind.Function:
          functionsTable.addRow(row);
          this._writeApiItemPage(apiMember);
          break;

        case ApiItemKind.TypeAlias:
          typeAliasesTable.addRow(row);