TypeScript Function API • Docs
TypeScript Function API / asset_builder / MapKeyFuncBuilder
Class: MapKeyFuncBuilder
Used to add a value to a map
Example
ts
const mapButton = new MapKeyFuncBuilder()
.setKey("Name")
.build()
Implements
Constructors
new MapKeyFuncBuilder()
new MapKeyFuncBuilder():
MapKeyFuncBuilder
Returns
Defined in
Properties
mapKeyFunc
mapKeyFunc:
MapKeyFunc
Defined in
Methods
build()
build():
MapKeyFunc
Build the object
Returns
Example
ts
.build()
Implementation of
Defined in
setKey()
setKey(
key
):this
Set the value of the key for the map entry
Parameters
• key: string
the name of the key
Returns
this
this
Example
ts
.setKey("Name")
Implementation of
Defined in
setValueFrom()
setValueFrom(
valueFrom
):this
DEPRECATED: this method no longer does anything. It will be ignored when executing the asset function. Please use the asset editing interface to perform equivalent functionality.
If the entry is new, you will need to regenerate the asset first!
In the past, this was used to set the value of this entry using a ValueFromBuilder.
Parameters
• valueFrom: ValueFrom
Returns
this
this
Example
ts
.setValueFrom(new ValueFromBuilder()
.setKind("prop")
.setPropPath(["root", "si", "name"])
.build())
Implementation of
IMapKeyFuncBuilder
.setValueFrom