Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

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 โ€‹

LoweredValue.constructor

Properties โ€‹

lowered โ€‹

protected readonly lowered: true = true

Defined in: core/values/value.ts:14

Tells lowered values apart from plain objects (e.g. NBT compounds).

Inherited from โ€‹

LoweredValue.lowered


value โ€‹

readonly value: string | TellrawPart | TellrawText

Defined in: core/values/component.ts:16

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.