Skip to main content

Class: MappedValue<I, T>

An accessible value that is mapped from one or more input accessibles.

Type parameters

NameType
Iextends any[]
TT

Implements

Methods

get

get(): T

Gets this item's state.

Returns

T

This item's state.

Implementation of

Accessible.get

Defined in

src/sdk/sub/MappedValue.ts:72


create

create<I>(...inputs): MappedValue<I, Readonly<I>>

Creates a new mapped accessible value whose state is a combined tuple of an arbitrary number of input accessibles.

Type parameters

NameType
Iextends any[]

Parameters

NameTypeDescription
...inputsMappedValueInputs<I>The accessibles that provide the inputs to the new mapped accessible.

Returns

MappedValue<I, Readonly<I>>

A new mapped accessible value whose state is a combined tuple of the specified input accessibles.

Defined in

src/sdk/sub/MappedValue.ts:43

create<I, T>(mapFunc, ...inputs): MappedValue<I, T>

Creates a new mapped accessible value.

Type parameters

NameType
Iextends any[]
TT

Parameters

NameTypeDescription
mapFunc(inputs: Readonly<I>) => TThe function to use to map inputs to the new accessible value.
...inputsMappedValueInputs<I>The accessibles that provide the inputs to the new mapped accessible.

Returns

MappedValue<I, T>

Defined in

src/sdk/sub/MappedValue.ts:51