X Tutup
Skip to content

Commit ca2cf88

Browse files
committed
When we trim an entire symbol it says "Excluded from this release type", whereas when we trim a declaration it says "Excluded declaration from this release type"
1 parent 37dbff5 commit ca2cf88

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

apps/api-extractor/src/generators/DtsRollupGenerator.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ export class DtsRollupGenerator {
8888
// For example, if the imported API comes from an external package that supports AEDoc,
8989
// and it was marked as `@internal`, then don't emit it.
9090
const symbolMetadata: SymbolMetadata | undefined = collector.tryFetchMetadataForAstEntity(astImport);
91-
const releaseTag: ReleaseTag = symbolMetadata ? symbolMetadata.maxEffectiveReleaseTag : ReleaseTag.None;
91+
const maxEffectiveReleaseTag: ReleaseTag = symbolMetadata
92+
? symbolMetadata.maxEffectiveReleaseTag : ReleaseTag.None;
9293

93-
if (this._shouldIncludeReleaseTag(releaseTag, dtsKind)) {
94+
if (this._shouldIncludeReleaseTag(maxEffectiveReleaseTag, dtsKind)) {
9495
DtsEmitHelpers.emitImport(stringWriter, entity, astImport);
9596
}
9697
}
@@ -99,9 +100,10 @@ export class DtsRollupGenerator {
99100
// Emit the regular declarations
100101
for (const entity of collector.entities) {
101102
const symbolMetadata: SymbolMetadata | undefined = collector.tryFetchMetadataForAstEntity(entity.astEntity);
102-
const releaseTag: ReleaseTag = symbolMetadata ? symbolMetadata.maxEffectiveReleaseTag : ReleaseTag.None;
103+
const maxEffectiveReleaseTag: ReleaseTag = symbolMetadata
104+
? symbolMetadata.maxEffectiveReleaseTag : ReleaseTag.None;
103105

104-
if (!this._shouldIncludeReleaseTag(releaseTag, dtsKind)) {
106+
if (!this._shouldIncludeReleaseTag(maxEffectiveReleaseTag, dtsKind)) {
105107
if (!collector.extractorConfig.omitTrimmingComments) {
106108
stringWriter.writeLine();
107109
stringWriter.writeLine(`/* Excluded from this release type: ${entity.nameForEmit} */`);
@@ -120,7 +122,7 @@ export class DtsRollupGenerator {
120122
) {
121123
if (!collector.extractorConfig.omitTrimmingComments) {
122124
stringWriter.writeLine();
123-
stringWriter.writeLine(`/* Excluded from this release type: ${entity.nameForEmit} */`);
125+
stringWriter.writeLine(`/* Excluded declaration from this release type: ${entity.nameForEmit} */`);
124126
}
125127
continue;
126128
} else {

build-tests/api-extractor-scenarios/etc/test-outputs/functionOverload/beta-rollup.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
/* Excluded from this release type: combine */
2+
/* Excluded declaration from this release type: combine */
33

44
/**
55
* @beta
@@ -16,7 +16,7 @@ export declare function combine(x: number, y: number): number;
1616
*/
1717
export declare function _combine(x: string, y: string): string;
1818

19-
/* Excluded from this release type: _combine */
19+
/* Excluded declaration from this release type: _combine */
2020

2121
/**
2222
* @public

build-tests/api-extractor-scenarios/etc/test-outputs/functionOverload/public-rollup.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
/* Excluded from this release type: combine */
2+
/* Excluded declaration from this release type: combine */
33

4-
/* Excluded from this release type: combine */
4+
/* Excluded declaration from this release type: combine */
55

66
/**
77
* @public

0 commit comments

Comments
 (0)
X Tutup