How to use the @microsoft/api-extractor-model.ApiParameterListMixin.isBaseClassOf 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 esfx / esfx / scripts / docs / yamlDocumenter.js View on Github external
[kGetSafeName](apiItem) {
        let safeName = this[kSafeNames].get(apiItem);
        if (!safeName) {
            safeName = apiItem.displayName;
            if (safeName === ts.InternalSymbolName.Computed && apiItem instanceof ApiDeclaredItem) {
                const match = /\[[^\[\]]+\]/.exec(apiItem.excerpt.text);
                if (match) {
                    safeName = match[0];
                }
            }
            if (this[kCollidesWithItemsOfSameName](apiItem)) {
                safeName += `_${apiItem.kind}`;
            }
            // For overloaded methods, add a suffix such as "MyClass.myMethod_2".
            if (ApiParameterListMixin.isBaseClassOf(apiItem)) {
                if (apiItem.overloadIndex > 0) {
                    safeName += `_${apiItem.overloadIndex}`;
                }
            }
            this[kSafeNames].set(apiItem, safeName);
        }
        return safeName;
    }
github microsoft / rushstack / apps / api-documenter / src / documenters / YamlDocumenter.ts View on Github external
protected _getUid(apiItem: ApiItem): string {
    let result: string = '';
    for (const hierarchyItem of apiItem.getHierarchy()) {
      // For overloaded methods, add a suffix such as "MyClass.myMethod_2".
      let qualifiedName: string = hierarchyItem.displayName;
      if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
        if (hierarchyItem.overloadIndex > 1) {
          // Subtract one for compatibility with earlier releases of API Documenter.
          // (This will get revamped when we fix GitHub issue #1308)
          qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;
        }
      }

      switch (hierarchyItem.kind) {
        case ApiItemKind.Model:
        case ApiItemKind.EntryPoint:
          break;
        case ApiItemKind.Package:
          result += PackageName.getUnscopedName(hierarchyItem.displayName);
          break;
        default:
          result += '.';
github ifiokjr / remirror / @remirror / api-documenter / src / documenters / markdown-documenter.ts View on Github external
private _getFilenameForApiItem(apiItem: ApiItem, withExtension = false): string {
    let baseName: string = '';
    for (const hierarchyItem of apiItem.getHierarchy()) {
      // For overloaded methods, add a suffix such as "MyClass.myMethod_2".
      let qualifiedName: string = hierarchyItem.displayName;
      if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
        if (hierarchyItem.overloadIndex > 0) {
          qualifiedName += `_${hierarchyItem.overloadIndex}`;
        }
      }

      switch (hierarchyItem.kind) {
        case ApiItemKind.Model:
        case ApiItemKind.EntryPoint:
          break;
        case ApiItemKind.Package:
          baseName = withExtension
            ? PackageName.getUnscopedName(hierarchyItem.displayName)
            : hierarchyItem.displayName;
          break;
        default:
          baseName += '.' + qualifiedName;
github microsoft / rushstack / apps / api-documenter / src / documenters / MarkdownDocumenter.ts View on Github external
private _getFilenameForApiItem(apiItem: ApiItem): string {
    if (apiItem.kind === ApiItemKind.Model) {
      return 'index.md';
    }

    let baseName: string = '';
    for (const hierarchyItem of apiItem.getHierarchy()) {
      // For overloaded methods, add a suffix such as "MyClass.myMethod_2".
      let qualifiedName: string = Utilities.getSafeFilenameForName(hierarchyItem.displayName);
      if (ApiParameterListMixin.isBaseClassOf(hierarchyItem)) {
        if (hierarchyItem.overloadIndex > 1) {
          // Subtract one for compatibility with earlier releases of API Documenter.
          // (This will get revamped when we fix GitHub issue #1308)
          qualifiedName += `_${hierarchyItem.overloadIndex - 1}`;
        }
      }

      switch (hierarchyItem.kind) {
        case ApiItemKind.Model:
        case ApiItemKind.EntryPoint:
          break;
        case ApiItemKind.Package:
          baseName = Utilities.getSafeFilenameForName(PackageName.getUnscopedName(hierarchyItem.displayName));
          break;
        default:
          baseName += '.' + qualifiedName;
github microsoft / rushstack / apps / api-documenter / src / utils / Utilities.ts View on Github external
public static getConciseSignature(apiItem: ApiItem): string {
    if (ApiParameterListMixin.isBaseClassOf(apiItem)) {
      return apiItem.displayName + '(' + apiItem.parameters.map(x => x.name).join(', ') + ')';
    }
    return apiItem.displayName;
  }