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?
optionalargs?:unknown[]
The arguments of the event (event)
clientId?
optionalclientId?:string
The client the event is pushed to (event), or the one subscribed (subscribed)
event?
optionalevent?:string
The name of the event (event)
id?
optionalid?:string|number
The id of the invocation answered (response)
response?
optionalresponse?: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