How to use the @microsoft/tsdoc/lib/beta/DeclarationReference.Navigation.Exports function in @microsoft/tsdoc

To help you get started, we’ve selected a few @microsoft/tsdoc 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-extractor / src / generators / DeclarationReferenceGenerator.ts View on Github external
}
    if (ts.isEnumMember(declaration)) {
      // enum members are exports
      return Navigation.Exports;
    }
    if (ts.isExportSpecifier(declaration)
      || ts.isExportAssignment(declaration)
      || ts.isExportSpecifier(declaration)
      || ts.isExportDeclaration(declaration)
      || ts.isNamedExports(declaration)
    ) {
      return Navigation.Exports;
    }
    // declarations are exports if they have an `export` modifier.
    if (ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Export) {
      return Navigation.Exports;
    }
    if (ts.isSourceFile(declaration.parent) && !ts.isExternalModule(declaration.parent)) {
      // declarations in a source file are global if the source file is not a module.
      return 'global';
    }
  }
  // all other declarations are locals
  return Navigation.Locals;
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiNamespace.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Namespace);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiEnumMember.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Member);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiTypeAlias.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.TypeAlias);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiVariable.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Variable);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiFunction.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Function)
      .withOverloadIndex(this.overloadIndex);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiEnum.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Enum);
  }
}
github microsoft / rushstack / apps / api-extractor-model / src / model / ApiClass.ts View on Github external
public buildCanonicalReference(): DeclarationReference {
    const nameComponent: Component = DeclarationReference.parseComponent(this.name);
    return (this.parent ? this.parent.canonicalReference : DeclarationReference.empty())
      .addNavigationStep(Navigation.Exports, nameComponent)
      .withMeaning(Meaning.Class);
  }
}