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: Set the value of this socket using a ValueFromBuilder. The recommended way to do this is to attach an attribute function.

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