Skip to content

Commit 3cf9944

Browse files
committed
Don't emit "declare" in .api.md files; we can eliminate this clutter since the new ".md" file extension disables semantic analysis
1 parent f48ece5 commit 3cf9944

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/api-extractor/src/generators/ReviewFileGenerator.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ export class ReviewFileGenerator {
137137

138138
case ts.SyntaxKind.ExportKeyword:
139139
case ts.SyntaxKind.DefaultKeyword:
140+
case ts.SyntaxKind.DeclareKeyword:
141+
// Delete any explicit "export" or "declare" keywords -- we will re-add them below
140142
span.modification.skipAll();
141143
break;
142144

@@ -194,7 +196,7 @@ export class ReviewFileGenerator {
194196
}
195197
const listPrefix: string = list.getSourceFile().text
196198
.substring(list.getStart(), list.declarations[0].getStart());
197-
span.modification.prefix = 'declare ' + listPrefix + span.modification.prefix;
199+
span.modification.prefix = listPrefix + span.modification.prefix;
198200
span.modification.suffix = ';';
199201

200202
if (entity.shouldInlineExport) {

0 commit comments

Comments
 (0)