Skip to content

Function: consume()

consume<T>(endpoint, config): Remote<T>

Creates a proxy object that forwards all operations to a remote endpoint

Type Parameters

T

T = any

Parameters

endpoint

PostMessageEndpoint

The PostMessage endpoint to communicate with

config

ConsumeConfig = {}

Configuration options for the consumer

Returns

Remote<T>

A proxied object that converts all operations to async RPC calls

Released under the MIT License.