mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix: docgen (#8582)
This commit is contained in:
@@ -6,8 +6,7 @@ export class DocumentedItem<T = DeclarationReflection | Item> {
|
|||||||
|
|
||||||
public serialize(): unknown {
|
public serialize(): unknown {
|
||||||
try {
|
try {
|
||||||
this.serializer();
|
return this.serializer();
|
||||||
return;
|
|
||||||
} catch (error_) {
|
} catch (error_) {
|
||||||
const error = error_ as Error;
|
const error = error_ as Error;
|
||||||
error.message = `Error while serializing ${this.detailedName()}: ${error.message}`;
|
error.message = `Error while serializing ${this.detailedName()}: ${error.message}`;
|
||||||
@@ -15,7 +14,7 @@ export class DocumentedItem<T = DeclarationReflection | Item> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected serializer() {
|
protected serializer(): unknown {
|
||||||
throw new Error("Method 'serializer()' must be implemented.");
|
throw new Error("Method 'serializer()' must be implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user