mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 21:24:42 +12:00
fix(api-extractor-model): resolve doc reference for classes with merged interfaces (#10225)
fix(api-extractor-model): resolve doc reference with merged interfaces
This commit is contained in:
parent
dae897bd09
commit
b79b7068e9
1 changed files with 12 additions and 4 deletions
|
@ -113,11 +113,19 @@ export class ModelReferenceResolver {
|
|||
const memberSelector: DocMemberSelector | undefined = memberReference.selector;
|
||||
if (memberSelector === undefined) {
|
||||
if (foundMembers.length > 1) {
|
||||
result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;
|
||||
return result;
|
||||
const foundClass: ApiItem | undefined = foundMembers.find((member) => member.kind === ApiItemKind.Class);
|
||||
if (
|
||||
foundClass &&
|
||||
foundMembers.filter((member) => member.kind === ApiItemKind.Interface).length === foundMembers.length - 1
|
||||
) {
|
||||
currentItem = foundClass;
|
||||
} else {
|
||||
result.errorMessage = `The member reference ${JSON.stringify(identifier)} was ambiguous`;
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
currentItem = foundMembers[0]!;
|
||||
}
|
||||
|
||||
currentItem = foundMembers[0]!;
|
||||
} else {
|
||||
let memberSelectorResult: IResolveDeclarationReferenceResult;
|
||||
switch (memberSelector.selectorKind) {
|
||||
|
|
Loading…
Reference in a new issue