fix(website): remove several obsolete special handling of dtypes (#10898)

* fix(website): remove several obsolete special handling of dtypes

* fix: reduce hardcoded places

* chore: api-extractor.json setting mainEntryPointName
This commit is contained in:
Qjuh
2025-05-13 20:40:41 +02:00
committed by GitHub
parent aa533efe26
commit 14e226b72b
12 changed files with 49 additions and 94 deletions

View File

@@ -209,6 +209,7 @@ interface IExtractorConfigParameters {
docModelIncludeForgottenExports: boolean;
enumMemberOrder: EnumMemberOrder;
mainEntryPointFilePath: string;
mainEntryPointName: string;
messages: IExtractorMessagesConfig;
newlineKind: NewlineKind;
omitTrimmingComments: boolean;
@@ -474,6 +475,7 @@ export class ExtractorConfig {
projectFolder,
packageJson,
packageFolder,
mainEntryPointName,
mainEntryPointFilePath,
additionalEntryPoints,
bundledPackages,
@@ -509,7 +511,7 @@ export class ExtractorConfig {
this.packageJson = packageJson;
this.packageFolder = packageFolder;
this.mainEntryPointFilePath = {
modulePath: '',
modulePath: mainEntryPointName,
filePath: mainEntryPointFilePath,
};
this.additionalEntryPoints = additionalEntryPoints;
@@ -1003,6 +1005,8 @@ export class ExtractorConfig {
tokenContext,
);
const mainEntryPointName = configObject.mainEntryPointName ?? '';
if (!ExtractorConfig.hasDtsFileExtension(mainEntryPointFilePath)) {
throw new Error('The "mainEntryPointFilePath" value is not a declaration file: ' + mainEntryPointFilePath);
}
@@ -1289,6 +1293,7 @@ export class ExtractorConfig {
packageJson,
packageFolder,
mainEntryPointFilePath,
mainEntryPointName,
additionalEntryPoints,
bundledPackages,
tsconfigFilePath,

View File

@@ -491,6 +491,11 @@ export interface IConfigFile {
*/
mainEntryPointFilePath: string;
/**
* Specifies the import path of the entrypoint used as the starting point for analysis.
*/
mainEntryPointName: string;
/**
* {@inheritDoc IExtractorMessagesConfig}
*/