mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
documentation v13
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"GEN_VERSION": 12,
|
||||
"GEN_VERSION": 13,
|
||||
"COMPRESS": false
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
const DocumentedItem = require('./DocumentedItem');
|
||||
const DocumentedItemMeta = require('./DocumentedItemMeta');
|
||||
const DocumentedVarType = require('./DocumentedVarType');
|
||||
const DocumentedParam = require('./DocumentedParam');
|
||||
|
||||
/*
|
||||
{ id: 'StringResolvable',
|
||||
@@ -19,17 +20,26 @@ const DocumentedVarType = require('./DocumentedVarType');
|
||||
|
||||
class DocumentedTypeDef extends DocumentedItem {
|
||||
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
}
|
||||
|
||||
registerMetaInfo(data) {
|
||||
super.registerMetaInfo(data);
|
||||
this.props = new Map();
|
||||
this.directData = data;
|
||||
this.directData.meta = new DocumentedItemMeta(this, data.meta);
|
||||
this.directData.type = new DocumentedVarType(this, data.type);
|
||||
data.properties = data.properties || [];
|
||||
for (const prop of data.properties) {
|
||||
this.props.set(prop.name, new DocumentedParam(this, prop));
|
||||
}
|
||||
}
|
||||
|
||||
serialize() {
|
||||
super.serialize();
|
||||
const { id, name, description, type, access, meta } = this.directData;
|
||||
return {
|
||||
const serialized = {
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
@@ -37,6 +47,8 @@ class DocumentedTypeDef extends DocumentedItem {
|
||||
access,
|
||||
meta: meta.serialize(),
|
||||
};
|
||||
serialized.properties = Array.from(this.props.values()).map(p => p.serialize());
|
||||
return serialized;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user