Module public

Source
Expand description

The public APIs of the library.

Import from @pistonite/workex

Type Aliases§

WxBusCreator

Type for creator functions that takes in a configuration object built from generated WxProtocolBindConfig objects.

WxBusRecvHandler

Handler registered on the bus for handling RPC calls from the other side. These functions are exported by the generated code and used by the bind configuration. They are not meant to be called directly by user code.

WxEc

Workex Error Codes

WxFrameLinkOptions

Options for linking to an iframe. See wxFrame

WxPromise

Promise type wrapper.

WxPromiseWrapper

Wrapper for different parts of a single promise. See wxMakePromise

WxProtocolOutput

Output of wxCreateBus

WxResult
WxVoid
WxWindowOpenOptions

Options for opening a window. See wxPopup

Variables§

wxLogger

Logger for Workex

wxMakePromise

Simple utility for making a promise and getting its resolve and reject functions.

Functions§

wxFrame

Create connection with an iframe element. Same-origin and cross-origin are both supported and the differences are handled internally.

wxPopup

Open the url in the popup window, and create a connection to it. Same-origin and cross-origin are both supported and the differences are handled internally.

wxWindowOwner

Create connection with the owner window (i.e. the opener or embedder) that used wxPopup or wxFrame.

wxWorker

Create connection to a Worker. The worker should connect to this end using wxWorkerGlobal.

wxWorkerGlobal

Create connection using the WorkerGlobalScope, which connects to the thread that created this worker using wxWorker.

wxWrapHandler

Wrap the return type T of a function as a WxPromise<T>.

Interfaces§

WxCloseController

Controller for closing the messaging channel

WxCreateBusOutput

Output of a bus creator function

WxError

Workex Error object, containing an error code and optionally a message

WxProtocolBindConfig

This is the configuration object passed into the creator functions, such as wxWorker and wxPopup. These are exported by the *.bus.ts files generated by the Workex CLI tool.

WxProtocolBoundSender

Sender type bound to a specific protocol.

WxProtocolConfig

Base type shape for the config object passed into the bus creation function. This is used to get type inferrence for wxCreateBus function.

WxWindow

Controller for the global Window object for talking to other Windows

WxWorkerCreateOptions

Options to create Worker connections, using wxWorker or wxWorkerGlobal.