Component

export class Component<T extends AnyComponent = AnyComponent>
export class Component<T extends AnyComponent = AnyComponent>
Represents a component
NameConstraintsOptionalDefaultDescription
TAnyComponentYesAnyComponentNone
Readonly
data:Readonly<T>
The API data associated with this component
Readonly
type:T['type']
The type of the component
equals(other):boolean
Whether or not the given components are equal
NameTypeOptionalDescription
otherthis | TNoThe component to compare against
toJSON():T
Returns the API-compatible JSON for this component