Skip to main content

HostPromise

kds-plugin-document / Exports / HostPromise

Interface: HostPromise<T>

代表异步操作的结果

The HostPromise class represents the eventual completion (or failure) of an asynchronous operation and its resulting value. NOTE: The promise passed from host cannot be chained.

Type parameters

Name
T

Table of contents

Methods

Methods

catch

catch(reject?): void

Parameters

NameType
reject?(error: any) => void

Returns

void

Defined in

api.d.ts:11165


then

then(resolve?, reject?): void

Parameters

NameType
resolve?(value: T) => void
reject?(error: any) => void

Returns

void

Defined in

api.d.ts:11164