probe-web / @probe-web/client / index / Transport
Type Alias: Transport
ts
type Transport =
| {
kind: "websocket";
url: string;
token?: string;
}
| {
kind: "webusb";
worker?: Worker;
};Defined in: index.ts:80
How Client.connect reaches probe-rs.
websocket: a nativeprobe-rs serveaturl(any browser, and Node).tokenis the server's access token, if it was started with one.webusb: probe-rs compiled to wasm, running in a Web Worker in this tab and talking to the probe over WebUSB (Chromium only). The probe must already be granted to the page.
Union Members
Type Literal
ts
{
kind: "websocket";
url: string;
token?: string;
}Type Literal
ts
{
kind: "webusb";
worker?: Worker;
}| Name | Type | Description | Defined in |
|---|---|---|---|
kind | "webusb" | - | index.ts:83 |
worker? | Worker | Defaults to a worker running probe-rs; tests pass the fake-probe worker from @probe-web/client/testing/worker. | index.ts:86 |