mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
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:
@@ -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,
|
||||
|
||||
@@ -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}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user