class ComponentBuilder

abstractexternal
declare abstract class ComponentBuilder<Component extends APIBaseComponent<ComponentType>> implements JSONEncodable<Component>

The base component builder that contains common symbols for all sorts of components.

Type Parameters

Component extends APIBaseComponent<ComponentType>

The type of API data that is stored within the builder

protectedabstractreadonlyexternal
data : ComponentBuilderBaseData

external
clearId() : this

Clears the id of this component, defaulting to a default incremented id.

external
setId(
id: number
) : this

Sets the id of this component.

abstractexternal
toJSON(
validationOverride?: boolean
) : Component

Serializes this builder to API-compatible JSON data.Note that by disabling validation, there is no guarantee that the resulting object will be valid.