mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix(api-extractor): link to enum types on inherited properties (#10085)
* fix: link to enum types on inherited properties * fix: `undefined` in properties without access modifier
This commit is contained in:
@@ -1712,6 +1712,7 @@ export class ApiModelGenerator {
|
|||||||
const mapper = Array.isArray(typey) ? typey : typey.types ?? [];
|
const mapper = Array.isArray(typey) ? typey : typey.types ?? [];
|
||||||
const lookup: { [K in ts.SyntaxKind]?: string } = {
|
const lookup: { [K in ts.SyntaxKind]?: string } = {
|
||||||
[ts.SyntaxKind.ClassDeclaration]: 'class',
|
[ts.SyntaxKind.ClassDeclaration]: 'class',
|
||||||
|
[ts.SyntaxKind.EnumDeclaration]: 'enum',
|
||||||
[ts.SyntaxKind.InterfaceDeclaration]: 'interface',
|
[ts.SyntaxKind.InterfaceDeclaration]: 'interface',
|
||||||
[ts.SyntaxKind.TypeAliasDeclaration]: 'type',
|
[ts.SyntaxKind.TypeAliasDeclaration]: 'type',
|
||||||
};
|
};
|
||||||
@@ -1770,9 +1771,9 @@ export class ApiModelGenerator {
|
|||||||
excerptTokens: [
|
excerptTokens: [
|
||||||
{
|
{
|
||||||
kind: ExcerptTokenKind.Content,
|
kind: ExcerptTokenKind.Content,
|
||||||
text: `${prop.access} ${prop.scope === 'static' ? 'static ' : ''}${prop.readonly ? 'readonly ' : ''}${
|
text: `${prop.access ? `${prop.access} ` : ''}${prop.scope === 'static' ? 'static ' : ''}${
|
||||||
prop.name
|
prop.readonly ? 'readonly ' : ''
|
||||||
} :`,
|
}${prop.name} :`,
|
||||||
},
|
},
|
||||||
...mappedVarType,
|
...mappedVarType,
|
||||||
{ kind: ExcerptTokenKind.Content, text: ';' },
|
{ kind: ExcerptTokenKind.Content, text: ';' },
|
||||||
|
|||||||
Reference in New Issue
Block a user