osra 0.6.9 → 0.6.11
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.
- package/build/connections/bidirectional.d.ts +4 -0
- package/build/connections/index.d.ts +4 -3
- package/build/index.js +654 -565
- package/build/index.js.map +1 -1
- package/build/revivables/abort-signal.d.ts +2 -0
- package/build/revivables/array-buffer.d.ts +2 -0
- package/build/revivables/async-iterator.d.ts +2 -0
- package/build/revivables/date.d.ts +2 -0
- package/build/revivables/error.d.ts +2 -0
- package/build/revivables/event-target.d.ts +2 -0
- package/build/revivables/event.d.ts +2 -0
- package/build/revivables/fallbacks.d.ts +4 -0
- package/build/revivables/function.d.ts +2 -0
- package/build/revivables/headers.d.ts +2 -0
- package/build/revivables/identity.d.ts +2 -0
- package/build/revivables/index.d.ts +10 -0
- package/build/revivables/map.d.ts +2 -0
- package/build/revivables/message-port.d.ts +6 -0
- package/build/revivables/promise.d.ts +2 -0
- package/build/revivables/readable-stream.d.ts +2 -0
- package/build/revivables/request.d.ts +2 -0
- package/build/revivables/response.d.ts +2 -0
- package/build/revivables/set.d.ts +2 -0
- package/build/revivables/transfer.d.ts +2 -0
- package/build/revivables/typed-array.d.ts +2 -0
- package/build/revivables/writable-stream.d.ts +2 -0
- package/build/types.d.ts +1 -1
- package/build/utils/base64.d.ts +10 -0
- package/build/utils/index.d.ts +1 -1
- package/build/utils/type-guards.d.ts +11 -4
- package/package.json +6 -1
|
@@ -36,23 +36,27 @@ export declare const startBidirectionalConnection: <TModules extends readonly Re
|
|
|
36
36
|
}, {
|
|
37
37
|
readonly type: 'clonable';
|
|
38
38
|
readonly capableOnly: true;
|
|
39
|
+
readonly objectsOnly: true;
|
|
39
40
|
readonly isType: (value: unknown) => value is import("../revivables/fallbacks.js").Clonable;
|
|
40
41
|
readonly box: (value: import("../revivables/fallbacks.js").Clonable, _context: import("../index.js").RevivableContext<any>) => import("../revivables/fallbacks.js").Clonable;
|
|
41
42
|
readonly revive: (value: import("../revivables/fallbacks.js").BoxedClonable, _context: import("../index.js").RevivableContext<any>) => import("../revivables/fallbacks.js").Clonable;
|
|
42
43
|
}, {
|
|
43
44
|
readonly type: 'transferable';
|
|
44
45
|
readonly capableOnly: true;
|
|
46
|
+
readonly objectsOnly: true;
|
|
45
47
|
readonly isType: (value: unknown) => value is import("../revivables/fallbacks.js").Transferable;
|
|
46
48
|
readonly box: (value: import("../revivables/fallbacks.js").Transferable, _context: import("../index.js").RevivableContext<any>) => import("../revivables/fallbacks.js").Transferable;
|
|
47
49
|
readonly revive: (value: import("../revivables/fallbacks.js").BoxedTransferable, _context: import("../index.js").RevivableContext<any>) => import("../revivables/fallbacks.js").Transferable;
|
|
48
50
|
}, {
|
|
49
51
|
readonly type: 'blob';
|
|
50
52
|
readonly capableOnly: true;
|
|
53
|
+
readonly objectsOnly: true;
|
|
51
54
|
readonly isType: (value: unknown) => value is Blob;
|
|
52
55
|
readonly box: (value: Blob, context: import("../index.js").RevivableContext<any>) => Blob;
|
|
53
56
|
readonly revive: (value: import("../revivables/fallbacks.js").BoxedBlob, _context: import("../index.js").RevivableContext<any>) => Blob;
|
|
54
57
|
}, typeof import("../revivables/event-target.js"), {
|
|
55
58
|
readonly type: 'unclonable';
|
|
59
|
+
readonly objectsOnly: true;
|
|
56
60
|
readonly isType: (value: unknown) => value is never;
|
|
57
61
|
readonly box: (_value: never, _context: import("../index.js").RevivableContext<any>) => import("../revivables/fallbacks.js").BoxedUnclonable;
|
|
58
62
|
readonly revive: (_value: import("../revivables/fallbacks.js").BoxedUnclonable, _context: import("../index.js").RevivableContext<any>) => Record<string, never>;
|
|
@@ -4,15 +4,16 @@ import type { Capable } from '../types.js';
|
|
|
4
4
|
import type { ProtocolContext, StartConnectionsOptions } from './utils.js';
|
|
5
5
|
import type { Contextual, Exposed } from './utils.js';
|
|
6
6
|
import * as bidirectional from './bidirectional.js';
|
|
7
|
-
export
|
|
7
|
+
export type { InitMessage, Messages, ConnectionRevivableContext, BidirectionalConnection, } from './bidirectional.js';
|
|
8
8
|
export * from './relay.js';
|
|
9
|
-
export
|
|
9
|
+
export { context } from './utils.js';
|
|
10
|
+
export type { Connected, Contextual, Exposed, StartConnectionsOptions, ProtocolContext, ProtocolEventMap, ProtocolEventTarget, ConnectionQueue, } from './utils.js';
|
|
10
11
|
export type ConnectionModule<T> = {
|
|
11
12
|
readonly type: string;
|
|
12
13
|
readonly init: (ctx: ProtocolContext<any>) => void;
|
|
13
14
|
readonly Messages?: T;
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
declare const connections: readonly [typeof bidirectional];
|
|
16
17
|
export type DefaultConnectionModules = typeof connections;
|
|
17
18
|
export type DefaultConnectionModule = DefaultConnectionModules[number];
|
|
18
19
|
export type ConnectionMessage<TModules extends readonly RevivableModule[] = DefaultRevivableModules, T extends Capable<TModules> = Capable<TModules>> = DefaultConnectionModule extends {
|