Skip to content

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 native probe-rs serve at url (any browser, and Node). token is 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;
}
NameTypeDescriptionDefined in
kind"webusb"-index.ts:83
worker?WorkerDefaults to a worker running probe-rs; tests pass the fake-probe worker from @probe-web/client/testing/worker.index.ts:86