Class default<RemoteApi, LocalApi>

Contain functionality for using RPC conection

Param

Connection object

Param

Disconnect callback

Param

Object containing handlers for each request by name

Type Parameters

  • RemoteApi extends RpcApi<RemoteApi>

  • LocalApi extends RpcApi<LocalApi>

Hierarchy

  • default

Constructors

Properties

Methods

Constructors

Properties

connection: default

Methods

  • Make a notification

    Type Parameters

    • Name extends string | number | symbol

    Parameters

    • name: Name

      Method name

    • params: Parameters<RemoteApi[Name]>[0]

      Method params

    Returns void

  • Make a request

    Type Parameters

    • Name extends string | number | symbol

    Parameters

    • name: Name

      Method name

    • params: Parameters<RemoteApi[Name]>[0]

      Method params

    Returns Promise<ReturnType<RemoteApi[Name]>>

    Promise which will be resolved after receiving response message

Generated using TypeDoc