Skip to content

TypeScript Function APIDocs


TypeScript Function API / asset_builder / ValueFromBuilder

Class: ValueFromBuilder

Gets a value from a socket or prop

Example

ts
const value = new ValueFromBuilder()
 .setKind("prop")
 .setPropPath(["root", "si", "name"])
 .build()

Implements

Constructors

new ValueFromBuilder()

new ValueFromBuilder(): ValueFromBuilder

Returns

ValueFromBuilder

Defined in

asset_builder.ts:34

Properties

valueFrom

valueFrom: ValueFrom

Defined in

asset_builder.ts:32

Methods

setKind()

setKind(kind): this

The type of the builder

Parameters

kind: ValueFromKind

{string} [inputSocket | outputSocket | prop]

Returns

this

this

Example

ts
.setKind("prop")

Implementation of

IValueFromBuilder.setKind

Defined in

asset_builder.ts:48


setSocketName()

setSocketName(name): this

Specify the socket name if using an inputSocket or outputSocket

Parameters

name: string

Returns

this

this

Example

ts
.setSocketName("Region")

Implementation of

IValueFromBuilder.setSocketName

Defined in

asset_builder.ts:63


setPropPath()

setPropPath(path): this

Specify the prop path if using a prop

Parameters

path: string[]

a list of strings that represent the path to the prop

Returns

this

this

Example

ts
.setPropPath(["root", "si", "name"])

Implementation of

IValueFromBuilder.setPropPath

Defined in

asset_builder.ts:84


build()

build(): ValueFrom

Build the object

Returns

ValueFrom

Example

ts
.build()

Implementation of

IValueFromBuilder.build

Defined in

asset_builder.ts:99