diff --git a/src/lib/converter/symbols.ts b/src/lib/converter/symbols.ts index cf6136e0b..a68c99201 100644 --- a/src/lib/converter/symbols.ts +++ b/src/lib/converter/symbols.ts @@ -73,6 +73,7 @@ export function convertSymbol( // but aren't aliased symbols because `export *` was used. const previous = context.project.getReflectionFromSymbol(symbol); if ( + !context.converter.application.options.getValue("disableAliases") && previous && previous.parent?.kindOf(ReflectionKind.Module | ReflectionKind.Project) ) { @@ -704,7 +705,10 @@ function convertAlias( const reflection = context.project.getReflectionFromSymbol( context.resolveAliasedSymbol(symbol) ); - if (!reflection) { + if ( + !reflection || + context.converter.application.options.getValue("disableAliases") + ) { // We don't have this, convert it. convertSymbol( context, diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index cf5fa2252..67598226d 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -46,6 +46,7 @@ export interface TypeDocOptionMap { excludeNotDocumented: boolean; excludeInternal: boolean; disableSources: boolean; + disableAliases: boolean; includes: string; media: string; diff --git a/src/lib/utils/options/sources/typedoc.ts b/src/lib/utils/options/sources/typedoc.ts index 15fa05456..e2eace1a8 100644 --- a/src/lib/utils/options/sources/typedoc.ts +++ b/src/lib/utils/options/sources/typedoc.ts @@ -72,6 +72,11 @@ export function addTypeDocOptions(options: Pick) { "Disables setting the source of a reflection when documenting it.", type: ParameterType.Boolean, }); + options.addDeclaration({ + name: "disableAliases", + help: "Disables creating aliases for shared reflections.", + type: ParameterType.Boolean, + }); options.addDeclaration({ name: "includes", help: