char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somport webstreams extension to typescripte9b1b43

main
4.0 KiB65 linesraw
1declare const apply: typeof import("ext:core/primordials").ReflectApply;
2declare const descriptor: typeof import("ext:core/primordials").ObjectGetOwnPropertyDescriptor;
3declare const getPrototype: typeof import("ext:core/primordials").ObjectGetPrototypeOf;
4declare const setPrototype: typeof import("ext:core/primordials").ObjectSetPrototypeOf;
5declare const define: typeof import("ext:core/primordials").ObjectDefineProperty;
6declare const get: typeof import("ext:core/primordials").WeakMapPrototypeGet;
7declare const set: typeof import("ext:core/primordials").WeakMapPrototypeSet;
8declare const mapGet: typeof import("ext:core/primordials").MapPrototypeGet;
9declare const mapSet: typeof import("ext:core/primordials").MapPrototypeSet;
10declare const mapDelete: typeof import("ext:core/primordials").MapPrototypeDelete;
11declare const mapForEach: typeof import("ext:core/primordials").MapPrototypeForEach;
12declare const mapClear: typeof import("ext:core/primordials").MapPrototypeClear;
13declare const then: typeof import("ext:core/promises").promiseThen;
14declare const safeNewPromise: typeof import("ext:core/promises").newPromise;
15declare const safePromiseResolve: typeof import("ext:core/promises").promiseResolve;
16declare const safePromiseReject: typeof import("ext:core/promises").promiseReject;
17declare const markPromiseHandled: typeof import("ext:core/promises").markPromiseHandled;
18declare const cloneValue: typeof import("ext:web/serialization.js").cloneValue;
19declare const registerMarkedTransferable: typeof import("ext:web/serialization.js").registerMarkedTransferable;
20declare const registerWire: typeof import("ext:web/serialization.js").registerWire;
21declare const dataCloneError: typeof import("ext:web/events.js").dataCloneError;
22declare const addListener: typeof import("ext:web/events.js").addListener;
23declare const MessagePort: typeof import("ext:web/messaging.js").MessagePort;
24declare const adoptPort: typeof import("ext:web/messaging.js").adoptPort;
25declare const messageData: typeof import("ext:web/messaging.js").messageData;
26declare const referencePort: typeof import("ext:web/messaging.js").referencePort;
27declare const setPortCloseHandler: typeof import("ext:web/messaging.js").setPortCloseHandler;
28declare const startPort: typeof import("ext:web/messaging.js").startPort;
29declare const op_port_pair: typeof import("ext:core/ops").op_port_pair;
30declare const op_port_move: typeof import("ext:core/ops").op_port_move;
31declare const op_port_close: typeof import("ext:core/ops").op_port_close;
32
33type ReadableResource = import("ext:webstreams/streams.js").ReadableStream;
34type WritableResource = import("ext:webstreams/streams.js").WritableStream;
35type TransformResource = import("ext:webstreams/streams.js").TransformStream;
36type Reader = import("ext:webstreams/streams.js").ReadableStreamDefaultReader;
37type Writer = import("ext:webstreams/streams.js").WritableStreamDefaultWriter;
38type ReadController = import("ext:webstreams/streams.js").ReadableStreamDefaultController;
39type WriteController = import("ext:webstreams/streams.js").WritableStreamDefaultController;
40type ReadResult = import("ext:webstreams/streams.js").ReadResult<unknown>;
41type Port = import("ext:web/messaging.js").MessagePort;
42type StreamResource = ReadableResource | WritableResource | TransformResource;
43interface StreamRecord {
44  source: object;
45  kind?: "readable" | "writable" | "transform";
46  readable: ReadableResource | null;
47  writable: WritableResource | null;
48  reader?: Reader | null;
49  writer?: Writer | null;
50  readableClone?: ReadableResource;
51  writableClone?: WritableResource;
52  destination?: StreamResource;
53  controller?: WriteController;
54  writableState?: unknown;
55  readPair?: [number, number];
56  writePair?: [number, number];
57}
58type StreamPacket = [
59  kind: "readable" | "writable" | "transform",
60  readId: number | null,
61  writeId: number | null,
62  writableClosed: boolean,
63];
64type RequestPacket = [id: number, command: "read" | "write" | "close" | "abort" | "cancel", value?: unknown];
65type ReplyPacket = [id: number | null, ok: boolean, value: unknown];