@microsoft/api-extractor
Version:
Validate, document, and review the exported API for a TypeScript library
84 lines (83 loc) • 2.68 kB
TypeScript
import { IApiItemReference } from './api/ApiItem';
/**
* An API definition reference that is used to locate the documentation of exported
* API items that may or may not belong to an external package.
*
* The format of the API definition reference is:
* scopeName/packageName:exportName.memberName
*
* The following are valid API definition references:
* \@microsoft/sp-core-library:DisplayMode
* \@microsoft/sp-core-library:Guid
* \@microsoft/sp-core-library:Guid.equals
* es6-collections:Map
*/
export interface IApiDefinitionReferenceParts {
/**
* This is an optional property to denote that a package name is scoped under this name.
* For example, a common case is when having the '@microsoft' scope name in the
* API definition reference: '\@microsoft/sp-core-library'.
*/
scopeName: string;
/**
* The name of the package that the exportName belongs to.
*/
packageName: string;
/**
* The name of the export API item.
*/
exportName: string;
/**
* The name of the member API item.
*/
memberName: string;
}
/**
* {@inheritdoc IApiDefinitionReferenceParts}
*/
export declare class ApiDefinitionReference {
/**
* {@inheritdoc IApiDefinitionReferenceParts.scopeName}
*/
scopeName: string;
/**
* {@inheritdoc IApiDefinitionReferenceParts.packageName}
*/
packageName: string;
/**
* {@inheritdoc IApiDefinitionReferenceParts.exportName}
*/
exportName: string;
/**
* {@inheritdoc IApiDefinitionReferenceParts.memberName}
*/
memberName: string;
/**
* Creates an ApiDefinitionReference instance given strings that symbolize the public
* properties of ApiDefinitionReference.
*/
static createFromParts(parts: IApiDefinitionReferenceParts): ApiDefinitionReference;
/**
* Stringifies the ApiDefinitionReferenceOptions up and including the
* scope and package name.
*
* Example output: '@microsoft/Utilities'
*/
toScopePackageString(): string;
/**
* Stringifies the ApiDefinitionReferenceOptions up and including the
* scope, package and export name.
*
* Example output: '@microsoft/Utilities.Parse'
*/
toExportString(): string;
/**
* Stringifies the ApiDefinitionReferenceOptions up and including the
* scope, package, export and member name.
*
* Example output: '@microsoft/Utilities#Parse.parseJsonToString'
*/
toMemberString(): string;
toApiItemReference(): IApiItemReference;
private constructor();
}