Skip to content

Commit ea1693f

Browse files
fix: avoid entity name "default"
1 parent 76f12a1 commit ea1693f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/api-extractor/src/collector/Collector.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,11 @@ export class Collector {
529529
let nameForEmit: string = idealNameForEmit;
530530

531531
// Choose a name that doesn't conflict with usedNames or a global name
532-
while (usedNames.has(nameForEmit) || this.globalVariableAnalyzer.hasGlobalName(nameForEmit)) {
532+
while (
533+
nameForEmit === 'default' ||
534+
usedNames.has(nameForEmit) ||
535+
this.globalVariableAnalyzer.hasGlobalName(nameForEmit)
536+
) {
533537
nameForEmit = `${idealNameForEmit}_${++suffix}`;
534538
}
535539
entity.nameForEmit = nameForEmit;

0 commit comments

Comments
 (0)