mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
docs: allow @mixes TSDoc tag for documenting mixins (#10545)
This commit is contained in:
@@ -293,7 +293,7 @@ export class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumented
|
||||
|
||||
const tsdocConfiguration: TSDocConfiguration = new TSDocConfiguration();
|
||||
|
||||
if (versionToDeserialize >= ApiJsonSchemaVersion.V_1004 && 'tsdocConfiguration' in jsonObject) {
|
||||
if (versionToDeserialize >= ApiJsonSchemaVersion.V_1004 && 'tsdocConfig' in jsonObject.metadata) {
|
||||
const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadFromObject(jsonObject.metadata.tsdocConfig);
|
||||
if (tsdocConfigFile.hasErrors) {
|
||||
throw new Error(`Error loading ${apiJsonFilename}:\n` + tsdocConfigFile.getErrorSummary());
|
||||
@@ -420,6 +420,8 @@ export class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumented
|
||||
for (const key of Object.keys(item)) {
|
||||
if (key === 'dependencies') {
|
||||
result[MinifyJSONMapping.dependencies] = item.dependencies;
|
||||
} else if (key === 'tsdocConfig') {
|
||||
result[MinifyJSONMapping.tsdocConfig] = item.tsdocConfig;
|
||||
} else
|
||||
result[MinifyJSONMapping[key as keyof typeof MinifyJSONMapping]] =
|
||||
typeof item[key] === 'object' ? mapper(item[key]) : item[key];
|
||||
@@ -440,6 +442,8 @@ export class ApiPackage extends ApiItemContainerMixin(ApiNameMixin(ApiDocumented
|
||||
for (const key of Object.keys(item)) {
|
||||
if (key === MinifyJSONMapping.dependencies) {
|
||||
result.dependencies = item[MinifyJSONMapping.dependencies];
|
||||
} else if (key === MinifyJSONMapping.tsdocConfig) {
|
||||
result.tsdocConfig = item[MinifyJSONMapping.tsdocConfig];
|
||||
} else
|
||||
result[
|
||||
Object.keys(MinifyJSONMapping).find(
|
||||
|
||||
Reference in New Issue
Block a user