Skip to main content

Class: CompositeDataConverter

common.CompositeDataConverter

Implements#

Constructors#

constructor#

new CompositeDataConverter(...converters)

Parameters#

NameType
...convertersPayloadConverter[]

Properties#

converterByEncoding#

Readonly converterByEncoding: Map<string, PayloadConverter>


converters#

Readonly converters: PayloadConverter[]

Methods#

fromPayload#

fromPayload<T>(payload): Promise<T>

Type parameters#

Name
T

Parameters#

NameType
payloadIPayload

Returns#

Promise<T>

Implementation of#

DataConverter.fromPayload


fromPayloadSync#

fromPayloadSync<T>(payload): T

Sync conversion from a single payload, used in the Workflow runtime

Type parameters#

Name
T

Parameters#

NameType
payloadIPayload

Returns#

T

Implementation of#

DataConverter.fromPayloadSync


fromPayloads#

fromPayloads<T>(index, payloads?): Promise<T>

Implements conversion of an array of values of different types. Useful for deserializing arguments of function invocations.

Type parameters#

Name
T

Parameters#

NameType
indexnumber
payloads?null | IPayload[]

Returns#

Promise<T>

converted JS value

Implementation of#

DataConverter.fromPayloads


fromPayloadsSync#

fromPayloadsSync<T>(index, payloads?): T

Sync version of fromPayloads

Type parameters#

Name
T

Parameters#

NameType
indexnumber
payloads?null | IPayload[]

Returns#

T

Implementation of#

DataConverter.fromPayloadsSync


toPayload#

toPayload<T>(value): Promise<IPayload>

Type parameters#

Name
T

Parameters#

NameType
valueT

Returns#

Promise<IPayload>

Implementation of#

DataConverter.toPayload


toPayloadSync#

toPayloadSync<T>(value): IPayload

Sync conversion of single payload, used in the Workflow runtime

Type parameters#

Name
T

Parameters#

NameType
valueT

Returns#

IPayload

Implementation of#

DataConverter.toPayloadSync


toPayloads#

toPayloads(...values): Promise<undefined | IPayload[]>

Implements conversion of a list of values.

Parameters#

NameType
...valuesunknown[]

Returns#

Promise<undefined | IPayload[]>

converted value

Implementation of#

DataConverter.toPayloads


toPayloadsSync#

toPayloadsSync(...values): undefined | IPayload[]

Sync conversion of all arguments, used in the Workflow runtime

Implements conversion of a list of values.

Parameters#

NameType
...valuesunknown[]

Returns#

undefined | IPayload[]

converted value

Implementation of#

DataConverter.toPayloadsSync