Skip to content

Commit cd81fc9

Browse files
committed
Allow parsing of 'beta' DeclarationReference when parsing a DocDeclarationReference
1 parent 9a92bd9 commit cd81fc9

File tree

13 files changed

+1219
-177
lines changed

13 files changed

+1219
-177
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/tsdoc",
5+
"comment": "parse beta DeclarationReference in TSDoc",
6+
"type": "minor"
7+
}
8+
],
9+
"packageName": "@microsoft/tsdoc",
10+
"email": "ron.buckton@microsoft.com"
11+
}

tsdoc/etc/tsdoc.api.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export class DocComment extends DocNode {
6969
// @public
7070
export class DocDeclarationReference extends DocNode {
7171
// @internal
72-
constructor(parameters: IDocDeclarationReferenceParameters | IDocDeclarationReferenceParsedParameters);
72+
constructor(parameters: IDocDeclarationReferenceParameters | IDocDeclarationReferenceParsedParameters | IBetaDocDeclarationReferenceParameters | IBetaDocDeclarationReferenceParsedParameters);
73+
// Warning: (ae-forgotten-export) The symbol "DeclarationReference" needs to be exported by the entry point index.d.ts
74+
//
75+
// @beta
76+
get declarationReference(): DeclarationReference | undefined;
7377
emitAsTsdoc(): string;
7478
get importPath(): string | undefined;
7579
// @override (undocumented)
@@ -450,6 +454,8 @@ export enum ExcerptKind {
450454
// (undocumented)
451455
CodeSpan_OpeningDelimiter = "CodeSpan_OpeningDelimiter",
452456
// (undocumented)
457+
DeclarationReference_DeclarationReference = "DeclarationReference_DeclarationReference",
458+
// (undocumented)
453459
DeclarationReference_ImportHash = "DeclarationReference_ImportHash",
454460
// (undocumented)
455461
DeclarationReference_ImportPath = "DeclarationReference_ImportPath",
@@ -531,6 +537,20 @@ export enum ExcerptKind {
531537
Spacing = "Spacing"
532538
}
533539

540+
// @beta
541+
export interface IBetaDocDeclarationReferenceParameters extends IDocNodeParameters {
542+
// (undocumented)
543+
declarationReference: DeclarationReference;
544+
}
545+
546+
// @beta
547+
export interface IBetaDocDeclarationReferenceParsedParameters extends IDocNodeParsedParameters {
548+
// (undocumented)
549+
declarationReference?: DeclarationReference;
550+
// (undocumented)
551+
declarationReferenceExcerpt: TokenSequence;
552+
}
553+
534554
// @public
535555
export interface IDocBlockParameters extends IDocNodeParameters {
536556
// (undocumented)
@@ -1085,8 +1105,10 @@ export class ParserMessageLog {
10851105
addMessageForDocErrorText(docErrorText: DocErrorText): void;
10861106
addMessageForTextRange(messageId: TSDocMessageId, messageText: string, textRange: TextRange): void;
10871107
addMessageForTokenSequence(messageId: TSDocMessageId, messageText: string, tokenSequence: TokenSequence, docNode?: DocNode): void;
1108+
createMarker(): number;
10881109
get messages(): ReadonlyArray<ParserMessage>;
1089-
}
1110+
rollbackToMarker(marker: number): void;
1111+
}
10901112

10911113
// @public
10921114
export class PlainTextEmitter {
@@ -1248,6 +1270,9 @@ export class TSDocConfiguration {
12481270
isHtmlElementSupported(htmlTag: string): boolean;
12491271
isKnownMessageId(messageId: TSDocMessageId | string): boolean;
12501272
isTagSupported(tagDefinition: TSDocTagDefinition): boolean;
1273+
// (undocumented)
1274+
get parseBetaDeclarationReferences(): boolean | 'prefer';
1275+
set parseBetaDeclarationReferences(value: boolean | 'prefer');
12511276
setSupportedHtmlElements(htmlTags: string[]): void;
12521277
setSupportForTag(tagDefinition: TSDocTagDefinition, supported: boolean): void;
12531278
setSupportForTags(tagDefinitions: ReadonlyArray<TSDocTagDefinition>, supported: boolean): void;

0 commit comments

Comments
 (0)