mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(api-extractor): support multiple entrypoints (#10829)
* feat(api-extractor): support multiple entrypoints * chore: initial support in generateSplitDocumentation * chore: bring in line with upstream * refactor: multiple entrypoints in scripts * fix: split docs * feat: website * fix: docs failing on next * fix: don't include dtypes for now * refactor: don't fetch entrypoint if there is none --------- Co-authored-by: iCrawl <buechler.noel@outlook.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { InternalError } from '@rushstack/node-core-library';
|
||||
import { ApiItemContainerMixin } from '../mixins/ApiItemContainerMixin.js';
|
||||
import { ApiParameterListMixin } from '../mixins/ApiParameterListMixin.js';
|
||||
import type { Constructor, PropertiesOf } from '../mixins/Mixin.js';
|
||||
import type { ApiEntryPoint } from '../model/ApiEntryPoint.js';
|
||||
import type { ApiModel } from '../model/ApiModel.js';
|
||||
import type { ApiPackage } from '../model/ApiPackage.js';
|
||||
import type { DocgenJson } from '../model/Deserializer';
|
||||
@@ -301,6 +302,20 @@ export class ApiItem {
|
||||
return reversedParts.reverse().join('');
|
||||
}
|
||||
|
||||
/**
|
||||
* If this item is an ApiEntryPoint or has an ApiEntryPoint as one of its parents, then that object is returned.
|
||||
* Otherwise undefined is returned.
|
||||
*/
|
||||
public getAssociatedEntryPoint(): ApiEntryPoint | undefined {
|
||||
for (let current: ApiItem | undefined = this; current !== undefined; current = current.parent) {
|
||||
if (current.kind === ApiItemKind.EntryPoint) {
|
||||
return current as ApiEntryPoint;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* If this item is an ApiPackage or has an ApiPackage as one of its parents, then that object is returned.
|
||||
* Otherwise undefined is returned.
|
||||
|
||||
Reference in New Issue
Block a user