Appearance
helix / ComponentValue
Class: ComponentValue โ
Defined in: core/values/component.ts:15
A text component from a string or a tellraw-style part.
Component("hi") -> '{"text":"hi"}' Component(text("hi").bold()) -> '{"text":"hi","bold":true}' Component([text("a"), text("b")]) -> '[{"text":"a"},{"text":"b"}]'
A part referencing a selector, score or command (onClick, Score, SelectorText, NbtRef) only resolves inside a command, where codegen has a context.
Extends โ
Constructors โ
Constructor โ
new ComponentValue(
value):ComponentValue
Defined in: core/values/component.ts:16
Parameters โ
value โ
string | TellrawPart | TellrawText
Returns โ
ComponentValue
Overrides โ
Properties โ
lowered โ
protectedreadonlylowered:true=true
Defined in: core/values/value.ts:14
Tells lowered values apart from plain objects (e.g. NBT compounds).
Inherited from โ
value โ
readonlyvalue:string|TellrawPart|TellrawText
Defined in: core/values/component.ts:16