proxify

Module: proxify

Members

Methods

Returns a proxy for the given Api or ClientApi. Accessing a property A of it will return proxify(api.route(A)). Calling the proxy with an argument B will return api.close(B). When the properties then and catch of the proxy are accessed they will not be translated into route calls but passed through to api directly instead.

Parameters
Name Type Description
api Api | ClientApi

The Api to proxify.

Returns

A proxified version of the given Api.

Type
Proxy

Methods

(static) revert(proxy) → {Api|ClientApi}

Reverts the proxify function.

Parameters
Name Type Description
proxy Proxy

A proxy that was returned by proxify.

Returns

The Api that was used to construct proxy.

Type
Api | ClientApi