TypedDataComponent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Description
Holds aDataComponentType
and its value. Members
applyTo(patchedMap as PatchedDataComponentMap)
Applies the
TypedDataComponent
to a PatchedDataComponentMap. Parameters:
patchedMap: PatchedDataComponentMap
Type: PatchedDataComponentMap
- The PatchedDataComponentMap to apply the TypedDataComponent
to. asIData() as IData
Converts the
TypedDataComponent
to an IData
.Returns: The IData
representation of the TypedDataComponent
.
Return Type:
IData
implicit as IData
static of<T>(type as DataComponentType<T>, value as T) as TypedDataComponent<T>
Creates a new
TypedDataComponent
.Returns: A new TypedDataComponent
.
Parameters:
value: T
Type: T
- The value of the component.
Return Type:
TypedDataComponent<T>
Getter
type() as DataComponentType<T>
Gets the
DataComponentType
of the TypedDataComponent
.Returns: The DataComponentType
of the TypedDataComponent
.
Return Type:
DataComponentType<T>
value() as T
Gets the value of the
TypedDataComponent
.Returns: The value of the TypedDataComponent
.
Return Type:
T