Class: AsyncMap<InputType, MappedType>

这是一个异步值的接口,它包含了一个value字段和一个resolved字段 value字段表示异步操作的结果,resolved字段表示异步操作是否已经完成

Type parameters

Name
InputType
MappedType

Implements

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

new AsyncMap<InputType, MappedType>(input, mapper, initialVal?, scope?)

Type parameters

Name
InputType
MappedType

Parameters

Name Type
input GetterOf<AsyncValue<InputType>>
mapper MapperOf<[InputType], Promise<MappedType>>
initialVal? MappedType | typeof unresolvedFlag
scope? Scope

Properties

input

Private Readonly input: any


mapper

Private Readonly mapper: any


reactionDisposer

Private reactionDisposer: any


scope

Private Readonly scope: any


setError

Private setError: any


setMapping

Private setMapping: any


setValue

Private setValue: any


startObserving

Private startObserving: any


state

Private state: any


stopObserving

Private stopObserving: any


updateValue

Private updateValue: any

Accessors

error

get error(): unknown

Returns

unknown

Implementation of

AsyncErrorValue.error


errored

get errored(): boolean

Returns

boolean

Implementation of

AsyncErrorValue.errored


mapping

get mapping(): boolean

Returns

boolean


resolved

get resolved(): boolean

Returns

boolean

Implementation of

AsyncErrorValue.resolved


value

get value(): MappedType

Returns

MappedType

Implementation of

AsyncErrorValue.value