Skip to main content
Type Functions

Functions to cast an object's type (text, image, etc.).

Updated over 2 weeks ago

Overview

These functions all cast an object as a different object to access other properties.


Type Functions

As String

.asString(object)

This function lets you cast (treat) an object, variable, or value as a string.

As Number

.asNumber(object)

This function lets you cast (treat) an object, variable, or value as a number.

As Boolean

.asBool(object)

This function lets you cast (treat) an object, variable, or value as a boolean.

As Text

.asText(object)

This function lets you cast (treat) an object as a text element to access text properties for the object.

As Image

.asImage(object)

This function lets you cast (treat) an object as an image element to access image properties for the object.

As Symbol

.asSymbol(object)

This function lets you cast (treat) an object as an SF Symbol element to access symbol properties for the object.

As Element

.asElement()

This function lets you cast (treat) an object as an element

As Component

.asComponent(component)

This function lets you cast (treat) an instance of a component as a component so that you can access the states and variables of the component.

Did this answer your question?