Carbon
CoreClasses

BaseComponent

Extended by

Constructors

new BaseComponent()

new BaseComponent(data?): BaseComponent

Parameters

ParameterType
data?object
data.additionalData?ComponentAdditionalData

Returns

BaseComponent

Properties

PropertyModifierTypeDefault valueDescription
additionalDatapublicnull | ComponentAdditionalDatanull-
customIdabstractstringundefinedThe custom ID of the component
deferpublicbooleanfalseWhether the component response should be automatically deferred
ephemeralpublicbooleanfalseWhether the component response should be ephemeral
serializeabstract() => APIBaseComponent<ComponentType>undefined-
typeabstractComponentTypeundefinedThe type of the component

Methods

createId()

createId(additionalData): string

Create a custom ID to use for this component that embeds additional data that you want to be handed

Parameters

ParameterTypeDescription
additionalDatanull | ComponentAdditionalDataThe additional data that you want to be passed in this component's custom ID

Returns

string

The custom ID to use

On this page

Edit on GitHub