Skip to content

@istock/iswork / Exports / MessageIterator

Class: MessageIterator

异步消息函数遍历处理机制

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MessageIterator(): MessageIterator

Returns

MessageIterator

Properties

#event

Private Readonly #event: EventEmitter

Defined in

src/packages/iswork/src/message/message-iterator.ts:10

Methods

#messageAsyncGenerator

#messageAsyncGenerator(): AsyncGenerator<TMessageIteratorData, void, unknown>

异步消息生成器函数

Returns

AsyncGenerator<TMessageIteratorData, void, unknown>

Defined in

src/packages/iswork/src/message/message-iterator.ts:15


complete

complete(message?): Promise<void>

消息传递完成调用方法

Parameters

NameType
messageTMessageIteratorData

Returns

Promise<void>

Defined in

src/packages/iswork/src/message/message-iterator.ts:34


send

send(message?): Promise<void>

发送消息

Parameters

NameType
messageTMessageIteratorData

Returns

Promise<void>

Defined in

src/packages/iswork/src/message/message-iterator.ts:44


create

create(callback): AsyncIterator<TMessageIteratorData, void, unknown>

创建一个Generator异步消息函数

Parameters

NameType
callback(messageIterator: MessageIterator) => void

Returns

AsyncIterator<TMessageIteratorData, void, unknown>

Defined in

src/packages/iswork/src/message/message-iterator.ts:52

免责声明:本站所有信息、数据、软件仅供学习研究,都不构成投资建议,本站不承担由此导致的任何责任。