osra 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ export type ConnectionRevivableContext<TModules extends readonly RevivableModule
23
23
  revivableModules: TModules;
24
24
  eventTarget: MessageEventTarget<TModules>;
25
25
  };
26
- export declare const startBidirectionalConnection: <TModules extends readonly RevivableModule[] = readonly [typeof import("../revivables/transfer"), typeof import("../revivables/identity"), typeof import("../revivables/array-buffer"), typeof import("../revivables/date"), typeof import("../revivables/headers"), typeof import("../revivables/error"), typeof import("../revivables/typed-array"), typeof import("../revivables/blob"), typeof import("../revivables/promise"), typeof import("../revivables/function"), typeof import("../revivables/message-port"), typeof import("../revivables/readable-stream"), typeof import("../revivables/abort-signal"), typeof import("../revivables/response"), typeof import("../revivables/request"), typeof import("../revivables/map"), typeof import("../revivables/set"), typeof import("../revivables/bigint"), typeof import("../revivables/symbol"), typeof import("../revivables/event"), typeof import("../revivables/event-target"), {
26
+ export declare const startBidirectionalConnection: <TModules extends readonly RevivableModule[] = readonly [typeof import("../revivables/transfer"), typeof import("../revivables/identity"), typeof import("../revivables/array-buffer"), typeof import("../revivables/date"), typeof import("../revivables/headers"), typeof import("../revivables/error"), typeof import("../revivables/typed-array"), typeof import("../revivables/blob"), typeof import("../revivables/promise"), typeof import("../revivables/function"), typeof import("../revivables/message-port"), typeof import("../revivables/readable-stream"), typeof import("../revivables/writable-stream"), typeof import("../revivables/abort-signal"), typeof import("../revivables/response"), typeof import("../revivables/request"), typeof import("../revivables/map"), typeof import("../revivables/set"), typeof import("../revivables/bigint"), typeof import("../revivables/symbol"), typeof import("../revivables/event"), typeof import("../revivables/event-target"), {
27
27
  readonly type: 'clonable';
28
28
  readonly capableOnly: true;
29
29
  readonly isType: (value: unknown) => value is import("../revivables/fallbacks").Clonable;
@@ -4,6 +4,7 @@ import type { ProtocolContext, StartConnectionsOptions } from '../utils';
4
4
  import type { Capable } from '../types';
5
5
  import * as bidirectional from './bidirectional';
6
6
  export * from './bidirectional';
7
+ export * from './relay';
7
8
  export * from './utils';
8
9
  export type ConnectionModule<T> = {
9
10
  readonly type: string;
@@ -0,0 +1,11 @@
1
+ import type { Transport } from '../utils/transport';
2
+ export type RelayOptions = {
3
+ key?: string;
4
+ origin?: string;
5
+ originA?: string;
6
+ originB?: string;
7
+ nameA?: string;
8
+ nameB?: string;
9
+ unregisterSignal?: AbortSignal;
10
+ };
11
+ export declare const relay: (transportA: Transport, transportB: Transport, { key, origin, originA, originB, nameA, nameB, unregisterSignal, }?: RelayOptions) => void;