Skip to content

Commit a0c4a95

Browse files
committed
Added documentation
1 parent 34761e7 commit a0c4a95

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

api-extractor/src/DocItemLoader.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ export default class DocItemLoader {
4747
}
4848

4949
/**
50-
* Attempts to resolve an API item from the provided apiDefinitionRef.
51-
* First checks the cache for the package, if not in the cache then the method
52-
* will attempt to the locate the associated json file to load the package and
53-
* check there. If the API item can not be found the method will return undefined.
50+
* {@inheritdoc ApiDocumentation.IReferenceResolver}
5451
*/
5552
public resolve(apiDefinitionRef: IApiDefinitionReference, reportError: (message: string) => void): IDocItem {
5653
if (!apiDefinitionRef) {

api-extractor/src/definitions/ApiDocumentation.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export interface IScopePackageName {
6161
/**
6262
* A dependency for ApiDocumentation constructor that abstracts away the function
6363
* of resolving an API definition reference.
64+
*
65+
* @internalremarks reportError() will be called if the apiDefinitionRef is to a non local
66+
* item and the package of that non local item can not be found.
67+
* If there is no package given and an item can not be found we will return undefined.
68+
* Once we support local references, we can be sure that reportError will only be
69+
* called once if the item can not be found (and undefined will be retured by the reference
70+
* function).
6471
*/
6572
export interface IReferenceResolver {
6673
resolve(apiDefinitionRef: IApiDefinitionReference, reportError: (message: string) => void): IDocItem;

0 commit comments

Comments
 (0)