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

@@ -16,5 +16,7 @@ export const PACKAGES = [
export const PACKAGES_WITH_ENTRY_POINTS = ['discord-api-types'];
export const DEFAULT_ENTRY_POINT = ['v10'];
export const DESCRIPTION =
"discord.js is a powerful Node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.";

View File

@@ -1,3 +1,5 @@
import { DEFAULT_ENTRY_POINT } from './constants';
export function parseDocsPathParams(item: string[] | undefined): {
entryPoints: string[];
foundItem: string | undefined;
@@ -10,7 +12,7 @@ export function parseDocsPathParams(item: string[] | undefined): {
const hasTypeMarker = lastElement?.includes('%3A');
return {
entryPoints: hasTypeMarker ? item.slice(0, -1) : item,
entryPoints: hasTypeMarker ? item.slice(0, -1) : lastElement?.length === 0 ? DEFAULT_ENTRY_POINT : item,
foundItem: hasTypeMarker ? lastElement : undefined,
};
}