Class: RejectedAsyncValue<T, ERR>

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

Type parameters

Name Type
T T
ERR unknown

Implements

Table of contents

Constructors

Properties

Accessors

Constructors

constructor

new RejectedAsyncValue<T, ERR>(value, error)

Type parameters

Name Type
T T
ERR unknown

Parameters

Name Type
value T
error ERR

Properties

_error

Private Readonly _error: any


_value

Private Readonly _value: any


errored

Readonly errored: boolean

Implementation of

AsyncErrorValue.errored


resolved

Readonly resolved: boolean

Implementation of

AsyncErrorValue.resolved

Accessors

error

get error(): ERR

Returns

ERR

Implementation of

AsyncErrorValue.error


value

get value(): T

Returns

T

Implementation of

AsyncErrorValue.value