Skip to content

Type Alias: ReactNativeServiceMessage ​

说明

本页由源码中的注释生成,内容为英文。

ReactNativeServiceMessage = object

A message the adapter sends to the host, one JSON object per line: {type: 'response', id, response}, the response of an invocation, {type: 'event', clientId, event, args}, an event pushed to a client, {type: 'subscribed', clientId}, the answer to a subscription, or {type: 'paused'}, the application ready to be suspended

Properties ​

args? ​

optional args?: unknown[]

The arguments of the event (event)


clientId? ​

optional clientId?: string

The client the event is pushed to (event), or the one subscribed (subscribed)


event? ​

optional event?: string

The name of the event (event)


id? ​

optional id?: string | number

The id of the invocation answered (response)


response? ​

optional response?: ServiceResponse

{success, error, payload} (see ServiceResponseCodec): payload is the result, or error the whole error object when the action failed (response)


type ​

type: "response" | "event" | "subscribed" | "paused"

What the adapter sends: the response of an invocation, an event pushed to a client, the answer to a subscription, or the answer to a pause

Released under the MIT License.