Skip to content

TypeScript Function APIDocs


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

MapKeyFuncBuilder

Defined in

asset_builder.ts:384

Properties

mapKeyFunc

mapKeyFunc: MapKeyFunc

Defined in

asset_builder.ts:382

Methods

build()

build(): MapKeyFunc

Build the object

Returns

MapKeyFunc

Example

ts
.build()

Implementation of

IMapKeyFuncBuilder.build

Defined in

asset_builder.ts:394


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

IMapKeyFuncBuilder.setKey

Defined in

asset_builder.ts:408


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

Defined in

asset_builder.ts:427