@stryke/capnp 0.12.95 → 0.12.97
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/bin/capnpc.cjs +418 -316
- package/bin/capnpc.d.cts +909 -4
- package/bin/capnpc.d.cts.map +1 -1
- package/bin/capnpc.d.mts +909 -4
- package/bin/capnpc.d.mts.map +1 -1
- package/bin/capnpc.mjs +381 -280
- package/bin/capnpc.mjs.map +1 -1
- package/dist/capnp-es.BHkXHvyK-B3-d8RNu.d.mts +2991 -0
- package/dist/capnp-es.BHkXHvyK-B3-d8RNu.d.mts.map +1 -0
- package/dist/capnp-es.BHkXHvyK-CQWXOqvU.d.cts +2991 -0
- package/dist/capnp-es.BHkXHvyK-CQWXOqvU.d.cts.map +1 -0
- package/dist/{capnp-es.GpvEvMIK-C4q8I6qy.mjs → capnp-es.GpvEvMIK-CH8kq1KS.mjs} +13 -6
- package/dist/{capnp-es.GpvEvMIK-C4q8I6qy.mjs.map → capnp-es.GpvEvMIK-CH8kq1KS.mjs.map} +1 -1
- package/dist/{capnp-es.GpvEvMIK-BcYm5JyH.cjs → capnp-es.GpvEvMIK-CZ5ZimCD.cjs} +12 -5
- package/dist/{compile-ySRLGi2G.mjs → compile-D_BOc0dD.mjs} +109 -15
- package/dist/compile-D_BOc0dD.mjs.map +1 -0
- package/dist/{compile-DgmKft8T.cjs → compile-Yq1zhccM.cjs} +113 -19
- package/dist/compile.cjs +2 -2
- package/dist/compile.d.cts +38 -3
- package/dist/compile.d.cts.map +1 -0
- package/dist/compile.d.mts +38 -3
- package/dist/compile.d.mts.map +1 -0
- package/dist/compile.mjs +1 -2
- package/dist/{dist-BlvFBzSi.mjs → dist-DQ7xmzRT.mjs} +385 -16
- package/dist/dist-DQ7xmzRT.mjs.map +1 -0
- package/dist/{dist-YywzZL3Q.cjs → dist-VMGxvENY.cjs} +381 -12
- package/dist/{helpers-B1zJTrkG.mjs → helpers-2TldkyGG.mjs} +149 -149
- package/dist/helpers-2TldkyGG.mjs.map +1 -0
- package/dist/{helpers-B7aznH9v.cjs → helpers-Dn4nWOb7.cjs} +177 -177
- package/dist/helpers.cjs +2 -1
- package/dist/helpers.d.cts +1 -2
- package/dist/helpers.d.cts.map +1 -1
- package/dist/helpers.d.mts +1 -2
- package/dist/helpers.d.mts.map +1 -1
- package/dist/helpers.mjs +1 -1
- package/dist/index-63Za7yNc.d.cts +736 -0
- package/dist/index-63Za7yNc.d.cts.map +1 -0
- package/dist/index-LYXu6eWz.d.mts +736 -0
- package/dist/index-LYXu6eWz.d.mts.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -5
- package/dist/rpc-helpers.cjs +4 -3
- package/dist/rpc-helpers.d.cts +3 -4
- package/dist/rpc-helpers.d.cts.map +1 -1
- package/dist/rpc-helpers.d.mts +3 -4
- package/dist/rpc-helpers.d.mts.map +1 -1
- package/dist/rpc-helpers.mjs +2 -2
- package/dist/types-BjCOVfgj.d.cts +1506 -0
- package/dist/types-BjCOVfgj.d.cts.map +1 -0
- package/dist/types-CVzMn-TI.d.mts +1506 -0
- package/dist/types-CVzMn-TI.d.mts.map +1 -0
- package/dist/types.cjs +8 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +7 -2
- package/dist/types.mjs.map +1 -0
- package/package.json +8 -8
- package/schemas/cpp.cjs +1 -0
- package/schemas/cpp.d.cts.map +1 -1
- package/schemas/cpp.d.mts.map +1 -1
- package/schemas/index-BB47pUzp.d.cts +742 -0
- package/schemas/index-BB47pUzp.d.cts.map +1 -0
- package/schemas/index-DprjZUdT.d.mts +742 -0
- package/schemas/index-DprjZUdT.d.mts.map +1 -0
- package/schemas/persistent.cjs +2 -1
- package/schemas/persistent.d.cts +48 -21
- package/schemas/persistent.d.cts.map +1 -1
- package/schemas/persistent.d.mts +48 -21
- package/schemas/persistent.d.mts.map +1 -1
- package/schemas/persistent.mjs +1 -1
- package/schemas/persistent.mjs.map +1 -1
- package/schemas/rpc-twoparty.cjs +20 -1
- package/schemas/rpc-twoparty.d.cts +17 -17
- package/schemas/rpc-twoparty.d.cts.map +1 -1
- package/schemas/rpc-twoparty.d.mts +17 -17
- package/schemas/rpc-twoparty.d.mts.map +1 -1
- package/schemas/rpc-twoparty.mjs +19 -1
- package/schemas/rpc-twoparty.mjs.map +1 -1
- package/schemas/rpc.cjs +371 -1
- package/schemas/rpc.d.cts +141 -141
- package/schemas/rpc.d.cts.map +1 -1
- package/schemas/rpc.d.mts +141 -141
- package/schemas/rpc.d.mts.map +1 -1
- package/schemas/rpc.mjs +370 -1
- package/schemas/rpc.mjs.map +1 -1
- package/schemas/schema.cjs +96 -1
- package/schemas/schema.d.cts +286 -228
- package/schemas/schema.d.cts.map +1 -1
- package/schemas/schema.d.mts +286 -228
- package/schemas/schema.d.mts.map +1 -1
- package/schemas/schema.mjs +95 -1
- package/schemas/schema.mjs.map +1 -1
- package/schemas/{src-2eLj6yCr.cjs → src-B6FhDNiV.cjs} +19 -12
- package/schemas/{src-s2pCu2mc.mjs → src-B97sIXSw.mjs} +19 -13
- package/schemas/src-B97sIXSw.mjs.map +1 -0
- package/schemas/ts.cjs +1 -0
- package/schemas/ts.d.cts.map +1 -1
- package/schemas/ts.d.mts.map +1 -1
- package/dist/compile-DccxA7WZ.d.cts +0 -40
- package/dist/compile-DccxA7WZ.d.cts.map +0 -1
- package/dist/compile-UkKIpqrK.d.mts +0 -40
- package/dist/compile-UkKIpqrK.d.mts.map +0 -1
- package/dist/compile-ySRLGi2G.mjs.map +0 -1
- package/dist/dist-BlvFBzSi.mjs.map +0 -1
- package/dist/helpers-B1zJTrkG.mjs.map +0 -1
- package/dist/types-Cuj2daUE.mjs +0 -8
- package/dist/types-Cuj2daUE.mjs.map +0 -1
- package/dist/types-D03SjfBL.d.mts +0 -55
- package/dist/types-D03SjfBL.d.mts.map +0 -1
- package/dist/types-D52qMMoK.d.cts +0 -55
- package/dist/types-D52qMMoK.d.cts.map +0 -1
- package/dist/types-DHrjS-69.cjs +0 -13
- package/schemas/index-BAJMwFip.d.mts +0 -96
- package/schemas/index-BAJMwFip.d.mts.map +0 -1
- package/schemas/index-b7dam4EA.d.cts +0 -96
- package/schemas/index-b7dam4EA.d.cts.map +0 -1
- package/schemas/src-s2pCu2mc.mjs.map +0 -1
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import { A as Transport, C as PointerType, N as _StructCtor, O as Struct, S as PointerCtor, _ as Method, a as Client, b as PipelineOp, c as Deferred, d as Interface, f as List, g as Message$1, h as Message, i as Call, j as _ListCtor, k as StructCtor, m as ListElementSize, n as Answer, p as ListCtor, t as Data, v as ObjectSize, w as Segment, x as Pointer, y as Orphan } from "./capnp-es.BHkXHvyK-B3-d8RNu.mjs";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@6.0.3/node_modules/capnp-es/dist/shared/capnp-es.CMmWj66v.d.mts
|
|
4
|
+
/**
|
|
5
|
+
* PipelineClient implements Client by calling to the pipeline's answer.
|
|
6
|
+
*/
|
|
7
|
+
declare class PipelineClient<AnswerResults extends Struct, ParentResults extends Struct, Results extends Struct> implements Client {
|
|
8
|
+
pipeline: Pipeline<AnswerResults, ParentResults, Results>;
|
|
9
|
+
constructor(pipeline: Pipeline<AnswerResults, ParentResults, Results>);
|
|
10
|
+
transform(): PipelineOp[];
|
|
11
|
+
call<CallParams extends Struct, CallResults extends Struct>(call: Call<CallParams, CallResults>): Answer<CallResults>;
|
|
12
|
+
close(): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A Pipeline is a generic wrapper for an answer
|
|
16
|
+
*/
|
|
17
|
+
declare class Pipeline<AnswerResults extends Struct, ParentResults extends Struct, Results extends Struct> {
|
|
18
|
+
ResultsClass: StructCtor<Results>;
|
|
19
|
+
answer: Answer<AnswerResults>;
|
|
20
|
+
parent?: Pipeline<AnswerResults, Struct, ParentResults> | undefined;
|
|
21
|
+
op: PipelineOp;
|
|
22
|
+
pipelineClient?: PipelineClient<AnswerResults, ParentResults, Results>;
|
|
23
|
+
constructor(ResultsClass: StructCtor<Results>, answer: Answer<AnswerResults>, op?: PipelineOp, parent?: Pipeline<AnswerResults, Struct, ParentResults> | undefined);
|
|
24
|
+
transform(): PipelineOp[];
|
|
25
|
+
struct(): Promise<Results>;
|
|
26
|
+
client(): PipelineClient<AnswerResults, ParentResults, Results>;
|
|
27
|
+
getPipeline<RR extends Struct>(ResultsClass: StructCtor<RR>, off: number, defaultValue?: Pointer): Pipeline<AnswerResults, Results, RR>;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ../../node_modules/.pnpm/capnp-es@0.0.11_patch_hash=503a440bd2bef41c0cb22819bc4ced5a7f04993fb999f0d944e284220f14916b_typescript@6.0.3/node_modules/capnp-es/dist/index.d.mts
|
|
31
|
+
declare abstract class DeferredTransport implements Transport {
|
|
32
|
+
protected d?: Deferred<Message$1>;
|
|
33
|
+
protected closed: boolean;
|
|
34
|
+
abstract sendMessage(msg: Message$1): void;
|
|
35
|
+
close(): void;
|
|
36
|
+
recvMessage(): Promise<Message$1>;
|
|
37
|
+
protected reject: (err: unknown) => void;
|
|
38
|
+
protected resolve: (buf: ArrayBuffer) => void;
|
|
39
|
+
}
|
|
40
|
+
declare class ErrorClient implements Client {
|
|
41
|
+
err: Error;
|
|
42
|
+
constructor(err: Error);
|
|
43
|
+
call<P extends Struct, R extends Struct>(_call: Call<P, R>): Answer<R>;
|
|
44
|
+
close(): void;
|
|
45
|
+
}
|
|
46
|
+
declare function clientOrNull(client: Client | null): Client;
|
|
47
|
+
interface InterfaceDefinition {
|
|
48
|
+
methods: Array<Method<any, any>>;
|
|
49
|
+
}
|
|
50
|
+
declare class Registry {
|
|
51
|
+
static readonly interfaces: Map<bigint, InterfaceDefinition>;
|
|
52
|
+
static register(id: bigint, def: InterfaceDefinition): void;
|
|
53
|
+
static lookup(id: bigint): InterfaceDefinition | undefined;
|
|
54
|
+
}
|
|
55
|
+
declare class Text extends List<string> {
|
|
56
|
+
static fromPointer(pointer: Pointer): Text;
|
|
57
|
+
/**
|
|
58
|
+
* Read a utf-8 encoded string value from this pointer.
|
|
59
|
+
*
|
|
60
|
+
* @param index The index at which to start reading; defaults to zero.
|
|
61
|
+
* @returns The string value.
|
|
62
|
+
*/
|
|
63
|
+
get(index?: number): string;
|
|
64
|
+
/**
|
|
65
|
+
* Get the number of utf-8 encoded bytes in this text. This does **not** include the NUL byte.
|
|
66
|
+
*
|
|
67
|
+
* @returns The number of bytes allocated for the text.
|
|
68
|
+
*/
|
|
69
|
+
get length(): number;
|
|
70
|
+
/**
|
|
71
|
+
* Write a utf-8 encoded string value starting at the specified index.
|
|
72
|
+
*
|
|
73
|
+
* @param index The index at which to start copying the string. Note that if this is not zero the bytes
|
|
74
|
+
* before `index` will be left as-is. All bytes after `index` will be overwritten.
|
|
75
|
+
* @param value The string value to set.
|
|
76
|
+
*/
|
|
77
|
+
set(index: number, value: string): void;
|
|
78
|
+
toString(): string;
|
|
79
|
+
toJSON(): string;
|
|
80
|
+
[Symbol.toPrimitive](): string;
|
|
81
|
+
[Symbol.toStringTag](): string;
|
|
82
|
+
}
|
|
83
|
+
declare class Void extends Struct {
|
|
84
|
+
static readonly _capnp: _StructCtor;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Initialize a struct with the provided object size. This will allocate new space for the struct contents, ideally in
|
|
88
|
+
* the same segment as this pointer.
|
|
89
|
+
*
|
|
90
|
+
* @param size An object describing the size of the struct's data and pointer sections.
|
|
91
|
+
* @param s The struct to initialize.
|
|
92
|
+
*/
|
|
93
|
+
declare function initStruct(size: ObjectSize, s: Struct): void;
|
|
94
|
+
declare function initStructAt<T extends Struct>(index: number, StructClass: StructCtor<T>, p: Pointer): T;
|
|
95
|
+
declare function checkPointerBounds(index: number, s: Struct): void;
|
|
96
|
+
declare function getInterfaceClientOrNullAt(index: number, s: Struct): Client;
|
|
97
|
+
declare function getInterfaceClientOrNull(p: Pointer): Client;
|
|
98
|
+
/**
|
|
99
|
+
* Make a shallow copy of a struct's contents and update the pointer to point to the new content. The data and pointer
|
|
100
|
+
* sections will be resized to the provided size.
|
|
101
|
+
*
|
|
102
|
+
* WARNING: This method can cause data loss if `dstSize` is smaller than the original size!
|
|
103
|
+
*
|
|
104
|
+
* @param dstSize The desired size for the struct contents.
|
|
105
|
+
* @param s The struct to resize.
|
|
106
|
+
*/
|
|
107
|
+
declare function resize(dstSize: ObjectSize, s: Struct): void;
|
|
108
|
+
/**
|
|
109
|
+
* Convert a struct to a struct of the provided class. Particularly useful when casting to nested group types.
|
|
110
|
+
*
|
|
111
|
+
* @param StructClass The struct class to convert to. Not particularly useful if `Struct`.
|
|
112
|
+
* @param s The struct to convert.
|
|
113
|
+
* @returns A new instance of the desired struct class pointing to the same location.
|
|
114
|
+
*/
|
|
115
|
+
declare function getAs<T extends Struct>(StructClass: StructCtor<T>, s: Struct): T;
|
|
116
|
+
/**
|
|
117
|
+
* Read a boolean (bit) value out of a struct.
|
|
118
|
+
*
|
|
119
|
+
* @param bitOffset The offset in **bits** from the start of the data section.
|
|
120
|
+
* @param s The struct to read from.
|
|
121
|
+
* @param defaultMask The default value as a DataView.
|
|
122
|
+
* @returns The value.
|
|
123
|
+
*/
|
|
124
|
+
declare function getBit(bitOffset: number, s: Struct, defaultMask?: DataView): boolean;
|
|
125
|
+
declare function getData(index: number, s: Struct, defaultValue?: Pointer): Data;
|
|
126
|
+
declare function getDataSection(s: Struct): Pointer;
|
|
127
|
+
/**
|
|
128
|
+
* Read a float32 value out of a struct.
|
|
129
|
+
*
|
|
130
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
131
|
+
* @param s The struct to read from.
|
|
132
|
+
* @param defaultMask The default value as a DataView.
|
|
133
|
+
* @returns The value.
|
|
134
|
+
*/
|
|
135
|
+
declare function getFloat32(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
136
|
+
/**
|
|
137
|
+
* Read a float64 value out of this segment.
|
|
138
|
+
*
|
|
139
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
140
|
+
* @param s The struct to read from.
|
|
141
|
+
* @param defaultMask The default value as a DataView.
|
|
142
|
+
* @returns The value.
|
|
143
|
+
*/
|
|
144
|
+
declare function getFloat64(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
145
|
+
/**
|
|
146
|
+
* Read an int16 value out of this segment.
|
|
147
|
+
*
|
|
148
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
149
|
+
* @param s The struct to read from.
|
|
150
|
+
* @param defaultMask The default value as a DataView.
|
|
151
|
+
* @returns The value.
|
|
152
|
+
*/
|
|
153
|
+
declare function getInt16(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
154
|
+
/**
|
|
155
|
+
* Read an int32 value out of this segment.
|
|
156
|
+
*
|
|
157
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
158
|
+
* @param s The struct to read from.
|
|
159
|
+
* @param defaultMask The default value as a DataView.
|
|
160
|
+
* @returns The value.
|
|
161
|
+
*/
|
|
162
|
+
declare function getInt32(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
163
|
+
/**
|
|
164
|
+
* Read an int64 value out of this segment.
|
|
165
|
+
*
|
|
166
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
167
|
+
* @param s The struct to read from.
|
|
168
|
+
* @param defaultMask The default value as a DataView.
|
|
169
|
+
* @returns The value.
|
|
170
|
+
*/
|
|
171
|
+
declare function getInt64(byteOffset: number, s: Struct, defaultMask?: DataView): bigint;
|
|
172
|
+
/**
|
|
173
|
+
* Read an int8 value out of this segment.
|
|
174
|
+
*
|
|
175
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
176
|
+
* @param s The struct to read from.
|
|
177
|
+
* @param defaultMask The default value as a DataView.
|
|
178
|
+
* @returns The value.
|
|
179
|
+
*/
|
|
180
|
+
declare function getInt8(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
181
|
+
declare function getList<T>(index: number, ListClass: ListCtor<T>, s: Struct, defaultValue?: Pointer): List<T>;
|
|
182
|
+
declare function getPointer(index: number, s: Struct): Pointer;
|
|
183
|
+
declare function getPointerAs<T extends Pointer>(index: number, PointerClass: PointerCtor<T>, s: Struct): T;
|
|
184
|
+
declare function getPointerSection(s: Struct): Pointer;
|
|
185
|
+
declare function getSize(s: Struct): ObjectSize;
|
|
186
|
+
declare function getStruct<T extends Struct>(index: number, StructClass: StructCtor<T>, s: Struct, defaultValue?: Pointer): T;
|
|
187
|
+
declare function getText(index: number, s: Struct, defaultValue?: string): string;
|
|
188
|
+
/**
|
|
189
|
+
* Read an uint16 value out of a struct..
|
|
190
|
+
*
|
|
191
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
192
|
+
* @param s The struct to read from.
|
|
193
|
+
* @param defaultMask The default value as a DataView.
|
|
194
|
+
* @returns The value.
|
|
195
|
+
*/
|
|
196
|
+
declare function getUint16(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
197
|
+
/**
|
|
198
|
+
* Read an uint32 value out of a struct.
|
|
199
|
+
*
|
|
200
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
201
|
+
* @param s The struct to read from.
|
|
202
|
+
* @param defaultMask The default value as a DataView.
|
|
203
|
+
* @returns The value.
|
|
204
|
+
*/
|
|
205
|
+
declare function getUint32(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
206
|
+
/**
|
|
207
|
+
* Read an uint64 value out of a struct.
|
|
208
|
+
*
|
|
209
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
210
|
+
* @param s The struct to read from.
|
|
211
|
+
* @param defaultMask The default value as a DataView.
|
|
212
|
+
* @returns The value.
|
|
213
|
+
*/
|
|
214
|
+
declare function getUint64(byteOffset: number, s: Struct, defaultMask?: DataView): bigint;
|
|
215
|
+
/**
|
|
216
|
+
* Read an uint8 value out of a struct.
|
|
217
|
+
*
|
|
218
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
219
|
+
* @param s The struct to read from.
|
|
220
|
+
* @param defaultMask The default value as a DataView.
|
|
221
|
+
* @returns The value.
|
|
222
|
+
*/
|
|
223
|
+
declare function getUint8(byteOffset: number, s: Struct, defaultMask?: DataView): number;
|
|
224
|
+
declare function initData(index: number, length: number, s: Struct): Data;
|
|
225
|
+
declare function initList<T>(index: number, ListClass: ListCtor<T>, length: number, s: Struct): List<T>;
|
|
226
|
+
/**
|
|
227
|
+
* Write a boolean (bit) value to the struct.
|
|
228
|
+
*
|
|
229
|
+
* @param bitOffset The offset in **bits** from the start of the data section.
|
|
230
|
+
* @param value The value to write (writes a 0 for `false`, 1 for `true`).
|
|
231
|
+
* @param s The struct to write to.
|
|
232
|
+
* @param defaultMask The default value as a DataView.
|
|
233
|
+
*/
|
|
234
|
+
declare function setBit(bitOffset: number, value: boolean, s: Struct, defaultMask?: DataView): void;
|
|
235
|
+
/**
|
|
236
|
+
* Write a primitive float32 value to the struct.
|
|
237
|
+
*
|
|
238
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
239
|
+
* @param value The value to write.
|
|
240
|
+
* @param s The struct to write to.
|
|
241
|
+
* @param defaultMask The default value as a DataView.
|
|
242
|
+
*/
|
|
243
|
+
declare function setFloat32(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
244
|
+
/**
|
|
245
|
+
* Write a primitive float64 value to the struct.
|
|
246
|
+
*
|
|
247
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
248
|
+
* @param value The value to write.
|
|
249
|
+
* @param s The struct to write to.
|
|
250
|
+
* @param defaultMask The default value as a DataView.
|
|
251
|
+
*/
|
|
252
|
+
declare function setFloat64(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
253
|
+
/**
|
|
254
|
+
* Write a primitive int16 value to the struct.
|
|
255
|
+
*
|
|
256
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
257
|
+
* @param value The value to write.
|
|
258
|
+
* @param s The struct to write to.
|
|
259
|
+
* @param defaultMask The default value as a DataView.
|
|
260
|
+
*/
|
|
261
|
+
declare function setInt16(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
262
|
+
/**
|
|
263
|
+
* Write a primitive int32 value to the struct.
|
|
264
|
+
*
|
|
265
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
266
|
+
* @param value The value to write.
|
|
267
|
+
* @param s The struct to write to.
|
|
268
|
+
* @param defaultMask The default value as a DataView.
|
|
269
|
+
*/
|
|
270
|
+
declare function setInt32(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
271
|
+
/**
|
|
272
|
+
* Write a primitive int64 value to the struct.
|
|
273
|
+
*
|
|
274
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
275
|
+
* @param value The value to write.
|
|
276
|
+
* @param s The struct to write to.
|
|
277
|
+
* @param defaultMask The default value as a DataView.
|
|
278
|
+
*/
|
|
279
|
+
declare function setInt64(byteOffset: number, value: bigint, s: Struct, defaultMask?: DataView): void;
|
|
280
|
+
/**
|
|
281
|
+
* Write a primitive int8 value to the struct.
|
|
282
|
+
*
|
|
283
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
284
|
+
* @param value The value to write.
|
|
285
|
+
* @param s The struct to write to.
|
|
286
|
+
* @param defaultMask The default value as a DataView.
|
|
287
|
+
*/
|
|
288
|
+
declare function setInt8(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
289
|
+
declare function setText(index: number, value: string, s: Struct): void;
|
|
290
|
+
/**
|
|
291
|
+
* Write a primitive uint16 value to the struct.
|
|
292
|
+
*
|
|
293
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
294
|
+
* @param value The value to write.
|
|
295
|
+
* @param s The struct to write to.
|
|
296
|
+
* @param defaultMask The default value as a DataView.
|
|
297
|
+
*/
|
|
298
|
+
declare function setUint16(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
299
|
+
/**
|
|
300
|
+
* Write a primitive uint32 value to the struct.
|
|
301
|
+
*
|
|
302
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
303
|
+
* @param value The value to write.
|
|
304
|
+
* @param s The struct to write to.
|
|
305
|
+
* @param defaultMask The default value as a DataView.
|
|
306
|
+
*/
|
|
307
|
+
declare function setUint32(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
308
|
+
/**
|
|
309
|
+
* Write a primitive uint64 value to the struct.
|
|
310
|
+
*
|
|
311
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
312
|
+
* @param value The value to write.
|
|
313
|
+
* @param s The struct to write to.
|
|
314
|
+
* @param defaultMask The default value as a DataView.
|
|
315
|
+
*/
|
|
316
|
+
declare function setUint64(byteOffset: number, value: bigint, s: Struct, defaultMask?: DataView): void;
|
|
317
|
+
/**
|
|
318
|
+
* Write a primitive uint8 value to the struct.
|
|
319
|
+
*
|
|
320
|
+
* @param byteOffset The offset in bytes from the start of the data section.
|
|
321
|
+
* @param value The value to write.
|
|
322
|
+
* @param s The struct to write to.
|
|
323
|
+
* @param defaultMask The default value as a DataView.
|
|
324
|
+
*/
|
|
325
|
+
declare function setUint8(byteOffset: number, value: number, s: Struct, defaultMask?: DataView): void;
|
|
326
|
+
declare function testWhich(name: string, found: number, wanted: number, s: Struct): void;
|
|
327
|
+
declare function checkDataBounds(byteOffset: number, byteLength: number, s: Struct): void;
|
|
328
|
+
declare function adopt<T extends Pointer>(src: Orphan<T>, p: T): void;
|
|
329
|
+
/**
|
|
330
|
+
* Convert a pointer to an Orphan, zeroing out the pointer and leaving its content untouched. If the content is no
|
|
331
|
+
* longer needed, call `disown()` on the orphaned pointer to erase the contents as well.
|
|
332
|
+
*
|
|
333
|
+
* Call `adopt()` on the orphan with the new target pointer location to move it back into the message; the orphan
|
|
334
|
+
* object is then invalidated after adoption (can only adopt once!).
|
|
335
|
+
*
|
|
336
|
+
* @param p The pointer to turn into an Orphan.
|
|
337
|
+
* @returns An orphaned pointer.
|
|
338
|
+
*/
|
|
339
|
+
declare function disown<T extends Pointer>(p: T): Orphan<T>;
|
|
340
|
+
declare function dump(p: Pointer): string;
|
|
341
|
+
/**
|
|
342
|
+
* Get the total number of bytes required to hold a list of the provided size with the given length, rounded up to the
|
|
343
|
+
* nearest word.
|
|
344
|
+
*
|
|
345
|
+
* @param elementSize A number describing the size of the list elements.
|
|
346
|
+
* @param length The length of the list.
|
|
347
|
+
* @param compositeSize The size of each element in a composite list; required if
|
|
348
|
+
* `elementSize === ListElementSize.COMPOSITE`.
|
|
349
|
+
* @returns The number of bytes required to hold an element of that size, or `NaN` if that is undefined.
|
|
350
|
+
*/
|
|
351
|
+
declare function getListByteLength(elementSize: ListElementSize, length: number, compositeSize?: ObjectSize): number;
|
|
352
|
+
/**
|
|
353
|
+
* Get the number of bytes required to hold a list element of the provided size. `COMPOSITE` elements do not have a
|
|
354
|
+
* fixed size, and `BIT` elements are packed into exactly a single bit, so these both return `NaN`.
|
|
355
|
+
*
|
|
356
|
+
* @param elementSize A number describing the size of the list elements.
|
|
357
|
+
* @returns The number of bytes required to hold an element of that size, or `NaN` if that is undefined.
|
|
358
|
+
*/
|
|
359
|
+
declare function getListElementByteLength(elementSize: ListElementSize): number;
|
|
360
|
+
/**
|
|
361
|
+
* Add an offset to the pointer's offset and return a new Pointer for that address.
|
|
362
|
+
*
|
|
363
|
+
* @param offset The number of bytes to add to the offset.
|
|
364
|
+
* @param p The pointer to add from.
|
|
365
|
+
* @returns A new pointer to the address.
|
|
366
|
+
*/
|
|
367
|
+
declare function add(offset: number, p: Pointer): Pointer;
|
|
368
|
+
/**
|
|
369
|
+
* Replace a pointer with a deep copy of the pointer at `src` and all of its contents.
|
|
370
|
+
*
|
|
371
|
+
* @param src The pointer to copy.
|
|
372
|
+
* @param p The pointer to copy into.
|
|
373
|
+
*/
|
|
374
|
+
declare function copyFrom(src: Pointer, p: Pointer): void;
|
|
375
|
+
/**
|
|
376
|
+
* Recursively erase a pointer, any far pointers/landing pads/tag words, and the content it points to.
|
|
377
|
+
*
|
|
378
|
+
* Note that this will leave "holes" of zeroes in the message, since the space cannot be reclaimed. With packing this
|
|
379
|
+
* will have a negligible effect on the final message size.
|
|
380
|
+
*
|
|
381
|
+
* FIXME: This may need protection against infinite recursion...
|
|
382
|
+
*
|
|
383
|
+
* @param p The pointer to erase.
|
|
384
|
+
*/
|
|
385
|
+
declare function erase(p: Pointer): void;
|
|
386
|
+
/**
|
|
387
|
+
* Set the pointer (and far pointer landing pads, if applicable) to zero. Does not touch the pointer's content.
|
|
388
|
+
*
|
|
389
|
+
* @param p The pointer to erase.
|
|
390
|
+
*/
|
|
391
|
+
declare function erasePointer(p: Pointer): void;
|
|
392
|
+
/**
|
|
393
|
+
* Interpret the pointer as a far pointer, returning its target segment and offset.
|
|
394
|
+
*
|
|
395
|
+
* @param p The pointer to read from.
|
|
396
|
+
* @returns A pointer to the far target.
|
|
397
|
+
*/
|
|
398
|
+
declare function followFar(p: Pointer): Pointer;
|
|
399
|
+
/**
|
|
400
|
+
* If the pointer address references a far pointer, follow it to the location where the actual pointer data is written.
|
|
401
|
+
* Otherwise, returns the pointer unmodified.
|
|
402
|
+
*
|
|
403
|
+
* @param p The pointer to read from.
|
|
404
|
+
* @returns A new pointer representing the target location, or `p` if it is not a far pointer.
|
|
405
|
+
*/
|
|
406
|
+
declare function followFars(p: Pointer): Pointer;
|
|
407
|
+
declare function getCapabilityId(p: Pointer): number;
|
|
408
|
+
/**
|
|
409
|
+
* Obtain the location of the pointer's content, following far pointers as needed.
|
|
410
|
+
* If the pointer is a struct pointer and `compositeIndex` is set, it will be offset by a multiple of the struct's size.
|
|
411
|
+
*
|
|
412
|
+
* @param p The pointer to read from.
|
|
413
|
+
* @param ignoreCompositeIndex If true, will not follow the composite struct pointer's composite index and
|
|
414
|
+
* instead return a pointer to the parent list's contents (also the beginning of the first struct).
|
|
415
|
+
* @returns A pointer to the beginning of the pointer's content.
|
|
416
|
+
*/
|
|
417
|
+
declare function getContent(p: Pointer, ignoreCompositeIndex?: boolean): Pointer;
|
|
418
|
+
/**
|
|
419
|
+
* Read the target segment ID from a far pointer.
|
|
420
|
+
*
|
|
421
|
+
* @param p The pointer to read from.
|
|
422
|
+
* @returns The target segment ID.
|
|
423
|
+
*/
|
|
424
|
+
declare function getFarSegmentId(p: Pointer): number;
|
|
425
|
+
/**
|
|
426
|
+
* Get a number indicating the size of the list's elements.
|
|
427
|
+
*
|
|
428
|
+
* @param p The pointer to read from.
|
|
429
|
+
* @returns The size of the list's elements.
|
|
430
|
+
*/
|
|
431
|
+
declare function getListElementSize(p: Pointer): ListElementSize;
|
|
432
|
+
/**
|
|
433
|
+
* Get the number of elements in a list pointer. For composite lists, it instead represents the total number of words in
|
|
434
|
+
* the list (not counting the tag word).
|
|
435
|
+
*
|
|
436
|
+
* This method does **not** attempt to distinguish between composite and non-composite lists. To get the correct
|
|
437
|
+
* length for composite lists use `getTargetListLength()` instead.
|
|
438
|
+
*
|
|
439
|
+
* @param p The pointer to read from.
|
|
440
|
+
* @returns The length of the list, or total number of words for composite lists.
|
|
441
|
+
*/
|
|
442
|
+
declare function getListLength(p: Pointer): number;
|
|
443
|
+
/**
|
|
444
|
+
* Get the offset (in words) from the end of a pointer to the start of its content. For struct pointers, this is the
|
|
445
|
+
* beginning of the data section, and for list pointers it is the location of the first element. The value should
|
|
446
|
+
* always be zero for interface pointers.
|
|
447
|
+
*
|
|
448
|
+
* @param p The pointer to read from.
|
|
449
|
+
* @returns The offset, in words, from the end of the pointer to the start of the data section.
|
|
450
|
+
*/
|
|
451
|
+
declare function getOffsetWords(p: Pointer): number;
|
|
452
|
+
/**
|
|
453
|
+
* Look up the pointer's type.
|
|
454
|
+
*
|
|
455
|
+
* @param p The pointer to read from.
|
|
456
|
+
* @returns The type of pointer.
|
|
457
|
+
*/
|
|
458
|
+
declare function getPointerType(p: Pointer): PointerType;
|
|
459
|
+
/**
|
|
460
|
+
* Read the number of data words from this struct pointer.
|
|
461
|
+
*
|
|
462
|
+
* @param p The pointer to read from.
|
|
463
|
+
* @returns The number of data words in the struct.
|
|
464
|
+
*/
|
|
465
|
+
declare function getStructDataWords(p: Pointer): number;
|
|
466
|
+
/**
|
|
467
|
+
* Read the number of pointers contained in this struct pointer.
|
|
468
|
+
*
|
|
469
|
+
* @param p The pointer to read from.
|
|
470
|
+
* @returns The number of pointers in this struct.
|
|
471
|
+
*/
|
|
472
|
+
declare function getStructPointerLength(p: Pointer): number;
|
|
473
|
+
/**
|
|
474
|
+
* Get an object describing this struct pointer's size.
|
|
475
|
+
*
|
|
476
|
+
* @param p The pointer to read from.
|
|
477
|
+
* @returns The size of the struct.
|
|
478
|
+
*/
|
|
479
|
+
declare function getStructSize(p: Pointer): ObjectSize;
|
|
480
|
+
/**
|
|
481
|
+
* Get a pointer to this pointer's composite list tag word, following far pointers as needed.
|
|
482
|
+
*
|
|
483
|
+
* @param p The pointer to read from.
|
|
484
|
+
* @returns A pointer to the list's composite tag word.
|
|
485
|
+
*/
|
|
486
|
+
declare function getTargetCompositeListTag(p: Pointer): Pointer;
|
|
487
|
+
/**
|
|
488
|
+
* Get the object size for the target composite list, following far pointers as needed.
|
|
489
|
+
*
|
|
490
|
+
* @param p The pointer to read from.
|
|
491
|
+
* @returns An object describing the size of each struct in the list.
|
|
492
|
+
*/
|
|
493
|
+
declare function getTargetCompositeListSize(p: Pointer): ObjectSize;
|
|
494
|
+
/**
|
|
495
|
+
* Get the size of the list elements referenced by this pointer, following far pointers if necessary.
|
|
496
|
+
*
|
|
497
|
+
* @param p The pointer to read from.
|
|
498
|
+
* @returns The size of the elements in the list.
|
|
499
|
+
*/
|
|
500
|
+
declare function getTargetListElementSize(p: Pointer): ListElementSize;
|
|
501
|
+
/**
|
|
502
|
+
* Get the length of the list referenced by this pointer, following far pointers if necessary. If the list is a
|
|
503
|
+
* composite list, it will look up the tag word and read the length from there.
|
|
504
|
+
*
|
|
505
|
+
* @param p The pointer to read from.
|
|
506
|
+
* @returns The number of elements in the list.
|
|
507
|
+
*/
|
|
508
|
+
declare function getTargetListLength(p: Pointer): number;
|
|
509
|
+
/**
|
|
510
|
+
* Get the type of a pointer, following far pointers if necessary. For non-far pointers this is equivalent to calling
|
|
511
|
+
* `getPointerType()`.
|
|
512
|
+
*
|
|
513
|
+
* The target of a far pointer can never be another far pointer, and this method will throw if such a situation is
|
|
514
|
+
* encountered.
|
|
515
|
+
*
|
|
516
|
+
* @param p The pointer to read from.
|
|
517
|
+
* @returns The type of pointer referenced by this pointer.
|
|
518
|
+
*/
|
|
519
|
+
declare function getTargetPointerType(p: Pointer): PointerType;
|
|
520
|
+
/**
|
|
521
|
+
* Get the size of the struct referenced by a pointer, following far pointers if necessary.
|
|
522
|
+
*
|
|
523
|
+
* @param p The pointer to read from.
|
|
524
|
+
* @returns The size of the struct referenced by this pointer.
|
|
525
|
+
*/
|
|
526
|
+
declare function getTargetStructSize(p: Pointer): ObjectSize;
|
|
527
|
+
/**
|
|
528
|
+
* Initialize a pointer to point at the data in the content segment. If the content segment is not the same as the
|
|
529
|
+
* pointer's segment, this will allocate and write far pointers as needed. Nothing is written otherwise.
|
|
530
|
+
*
|
|
531
|
+
* The return value includes a pointer to write the pointer's actual data to (the eventual far target), and the offset
|
|
532
|
+
* value (in words) to use for that pointer. In the case of double-far pointers this offset will always be zero.
|
|
533
|
+
*
|
|
534
|
+
* @param contentSegment The segment containing this pointer's content.
|
|
535
|
+
* @param contentOffset The offset within the content segment for the beginning of this pointer's content.
|
|
536
|
+
* @param p The pointer to initialize.
|
|
537
|
+
* @returns An object containing a pointer (where the pointer data should be written), and
|
|
538
|
+
* the value to use as the offset for that pointer.
|
|
539
|
+
*/
|
|
540
|
+
declare function initPointer(contentSegment: Segment, contentOffset: number, p: Pointer): PointerAllocationResult;
|
|
541
|
+
/**
|
|
542
|
+
* Check if the pointer is a double-far pointer.
|
|
543
|
+
*
|
|
544
|
+
* @param p The pointer to read from.
|
|
545
|
+
* @returns `true` if it is a double-far pointer, `false` otherwise.
|
|
546
|
+
*/
|
|
547
|
+
declare function isDoubleFar(p: Pointer): boolean;
|
|
548
|
+
/**
|
|
549
|
+
* Quickly check to see if the pointer is "null". A "null" pointer is a zero word, equivalent to an empty struct
|
|
550
|
+
* pointer.
|
|
551
|
+
*
|
|
552
|
+
* @param p The pointer to read from.
|
|
553
|
+
* @returns `true` if the pointer is "null".
|
|
554
|
+
*/
|
|
555
|
+
declare function isNull(p: Pointer): boolean;
|
|
556
|
+
/**
|
|
557
|
+
* Relocate a pointer to the given destination, ensuring that it points to the same content. This will create far
|
|
558
|
+
* pointers as needed if the content is in a different segment than the destination. After the relocation the source
|
|
559
|
+
* pointer will be erased and is no longer valid.
|
|
560
|
+
*
|
|
561
|
+
* @param dst The desired location for the `src` pointer. Any existing contents will be erased before
|
|
562
|
+
* relocating!
|
|
563
|
+
* @param src The pointer to relocate.
|
|
564
|
+
*/
|
|
565
|
+
declare function relocateTo(dst: Pointer, src: Pointer): void;
|
|
566
|
+
/**
|
|
567
|
+
* Write a far pointer.
|
|
568
|
+
*
|
|
569
|
+
* @param doubleFar Set to `true` if this is a double far pointer.
|
|
570
|
+
* @param offsetWords The offset, in words, to the target pointer.
|
|
571
|
+
* @param segmentId The segment the target pointer is located in.
|
|
572
|
+
* @param p The pointer to write to.
|
|
573
|
+
*/
|
|
574
|
+
declare function setFarPointer(doubleFar: boolean, offsetWords: number, segmentId: number, p: Pointer): void;
|
|
575
|
+
/**
|
|
576
|
+
* Write a raw interface pointer.
|
|
577
|
+
*
|
|
578
|
+
* @param capId The capability ID.
|
|
579
|
+
* @param p The pointer to write to.
|
|
580
|
+
*/
|
|
581
|
+
declare function setInterfacePointer(capId: number, p: Pointer): void;
|
|
582
|
+
/**
|
|
583
|
+
* Reads a raw interface pointer
|
|
584
|
+
*
|
|
585
|
+
* @param p The pointer to read.
|
|
586
|
+
* @returns The capability ID.
|
|
587
|
+
*/
|
|
588
|
+
declare function getInterfacePointer(p: Pointer): number;
|
|
589
|
+
/**
|
|
590
|
+
* Write a raw list pointer.
|
|
591
|
+
*
|
|
592
|
+
* @param offsetWords The number of words from the end of this pointer to the beginning of the list content.
|
|
593
|
+
* @param size The size of each element in the list.
|
|
594
|
+
* @param length The number of elements in the list.
|
|
595
|
+
* @param p The pointer to write to.
|
|
596
|
+
* @param compositeSize For composite lists this describes the size of each element in this list. This
|
|
597
|
+
* is required for composite lists.
|
|
598
|
+
*/
|
|
599
|
+
declare function setListPointer(offsetWords: number, size: ListElementSize, length: number, p: Pointer, compositeSize?: ObjectSize): void;
|
|
600
|
+
/**
|
|
601
|
+
* Write a raw struct pointer.
|
|
602
|
+
*
|
|
603
|
+
* @param offsetWords The number of words from the end of this pointer to the beginning of the struct's data
|
|
604
|
+
* section.
|
|
605
|
+
* @param size An object describing the size of the struct.
|
|
606
|
+
* @param p The pointer to write to.
|
|
607
|
+
*/
|
|
608
|
+
declare function setStructPointer(offsetWords: number, size: ObjectSize, p: Pointer): void;
|
|
609
|
+
/**
|
|
610
|
+
* Read some bits off a pointer to make sure it has the right pointer data.
|
|
611
|
+
*
|
|
612
|
+
* @param pointerType The expected pointer type.
|
|
613
|
+
* @param p The pointer to validate.
|
|
614
|
+
* @param elementSize For list pointers, the expected element size. Leave this
|
|
615
|
+
* undefined for struct pointers.
|
|
616
|
+
*/
|
|
617
|
+
declare function validate(pointerType: PointerType, p: Pointer, elementSize?: ListElementSize): void;
|
|
618
|
+
declare function copyFromInterface(src: Pointer, dst: Pointer): void;
|
|
619
|
+
declare function copyFromList(src: Pointer, dst: Pointer): void;
|
|
620
|
+
declare function copyFromStruct(src: Pointer, dst: Pointer): void;
|
|
621
|
+
/**
|
|
622
|
+
* Track the allocation of a new Pointer object.
|
|
623
|
+
*
|
|
624
|
+
* This will decrement an internal counter tracking how many bytes have been traversed in the message so far. After
|
|
625
|
+
* a certain limit, this method will throw an error in order to prevent a certain class of DoS attacks.
|
|
626
|
+
*
|
|
627
|
+
* @param message The message the pointer belongs to.
|
|
628
|
+
* @param p The pointer being allocated.
|
|
629
|
+
*/
|
|
630
|
+
declare function trackPointerAllocation(message: Message, p: Pointer): void;
|
|
631
|
+
/**
|
|
632
|
+
* This is used as the return value for `Pointer.prototype.initPointer`. Turns out using a class in V8 for multiple
|
|
633
|
+
* return values is faster than using an array or anonymous object.
|
|
634
|
+
*
|
|
635
|
+
* http://jsben.ch/#/zTdbD
|
|
636
|
+
*/
|
|
637
|
+
declare class PointerAllocationResult {
|
|
638
|
+
readonly pointer: Pointer;
|
|
639
|
+
readonly offsetWords: number;
|
|
640
|
+
constructor(pointer: Pointer, offsetWords: number);
|
|
641
|
+
}
|
|
642
|
+
declare namespace utils {
|
|
643
|
+
export { PointerAllocationResult, add, adopt, checkDataBounds, checkPointerBounds, copyFrom, copyFromInterface, copyFromList, copyFromStruct, disown, dump, erase, erasePointer, followFar, followFars, getAs, getBit, getCapabilityId, getContent, getData, getDataSection, getFarSegmentId, getFloat32, getFloat64, getInt16, getInt32, getInt64, getInt8, getInterfaceClientOrNull, getInterfaceClientOrNullAt, getInterfacePointer, getList, getListByteLength, getListElementByteLength, getListElementSize, getListLength, getOffsetWords, getPointer, getPointerAs, getPointerSection, getPointerType, getSize, getStruct, getStructDataWords, getStructPointerLength, getStructSize, getTargetCompositeListSize, getTargetCompositeListTag, getTargetListElementSize, getTargetListLength, getTargetPointerType, getTargetStructSize, getText, getUint16, getUint32, getUint64, getUint8, initData, initList, initPointer, initStruct, initStructAt, isDoubleFar, isNull, relocateTo, resize, setBit, setFarPointer, setFloat32, setFloat64, setInt16, setInt32, setInt64, setInt8, setInterfacePointer, setListPointer, setStructPointer, setText, setUint16, setUint32, setUint64, setUint8, testWhich, trackPointerAllocation, validate };
|
|
644
|
+
}
|
|
645
|
+
declare const AnyPointerList: ListCtor<Pointer>;
|
|
646
|
+
declare class BoolList extends List<boolean> {
|
|
647
|
+
static readonly _capnp: _ListCtor;
|
|
648
|
+
get(index: number): boolean;
|
|
649
|
+
set(index: number, value: boolean): void;
|
|
650
|
+
[Symbol.toStringTag](): string;
|
|
651
|
+
}
|
|
652
|
+
declare function CompositeList<T extends Struct>(CompositeClass: StructCtor<T>): ListCtor<T>;
|
|
653
|
+
declare const DataList: ListCtor<Data>;
|
|
654
|
+
declare class Float32List extends List<number> {
|
|
655
|
+
static readonly _capnp: _ListCtor;
|
|
656
|
+
get(index: number): number;
|
|
657
|
+
set(index: number, value: number): void;
|
|
658
|
+
[Symbol.toStringTag](): string;
|
|
659
|
+
}
|
|
660
|
+
declare class Float64List extends List<number> {
|
|
661
|
+
static readonly _capnp: _ListCtor;
|
|
662
|
+
get(index: number): number;
|
|
663
|
+
set(index: number, value: number): void;
|
|
664
|
+
[Symbol.toStringTag](): string;
|
|
665
|
+
}
|
|
666
|
+
declare class Int8List extends List<number> {
|
|
667
|
+
static readonly _capnp: _ListCtor;
|
|
668
|
+
get(index: number): number;
|
|
669
|
+
set(index: number, value: number): void;
|
|
670
|
+
[Symbol.toStringTag](): string;
|
|
671
|
+
}
|
|
672
|
+
declare class Int16List extends List<number> {
|
|
673
|
+
static readonly _capnp: _ListCtor;
|
|
674
|
+
get(index: number): number;
|
|
675
|
+
set(index: number, value: number): void;
|
|
676
|
+
[Symbol.toStringTag](): string;
|
|
677
|
+
}
|
|
678
|
+
declare class Int32List extends List<number> {
|
|
679
|
+
static readonly _capnp: _ListCtor;
|
|
680
|
+
get(index: number): number;
|
|
681
|
+
set(index: number, value: number): void;
|
|
682
|
+
[Symbol.toStringTag](): string;
|
|
683
|
+
}
|
|
684
|
+
declare class Int64List extends List<bigint> {
|
|
685
|
+
static readonly _capnp: _ListCtor;
|
|
686
|
+
get(index: number): bigint;
|
|
687
|
+
set(index: number, value: bigint): void;
|
|
688
|
+
[Symbol.toStringTag](): string;
|
|
689
|
+
}
|
|
690
|
+
declare const InterfaceList: ListCtor<Interface>;
|
|
691
|
+
declare function PointerList<T extends Pointer>(PointerClass: PointerCtor<T>): ListCtor<T>;
|
|
692
|
+
declare class TextList extends List<string> {
|
|
693
|
+
static readonly _capnp: _ListCtor;
|
|
694
|
+
get(index: number): string;
|
|
695
|
+
set(index: number, value: string): void;
|
|
696
|
+
[Symbol.toStringTag](): string;
|
|
697
|
+
}
|
|
698
|
+
declare class Uint8List extends List<number> {
|
|
699
|
+
static readonly _capnp: _ListCtor;
|
|
700
|
+
get(index: number): number;
|
|
701
|
+
set(index: number, value: number): void;
|
|
702
|
+
[Symbol.toStringTag](): string;
|
|
703
|
+
}
|
|
704
|
+
declare class Uint16List extends List<number> {
|
|
705
|
+
static readonly _capnp: _ListCtor;
|
|
706
|
+
get(index: number): number;
|
|
707
|
+
set(index: number, value: number): void;
|
|
708
|
+
[Symbol.toStringTag](): string;
|
|
709
|
+
}
|
|
710
|
+
declare class Uint32List extends List<number> {
|
|
711
|
+
static readonly _capnp: _ListCtor;
|
|
712
|
+
get(index: number): number;
|
|
713
|
+
set(index: number, value: number): void;
|
|
714
|
+
[Symbol.toStringTag](): string;
|
|
715
|
+
}
|
|
716
|
+
declare class Uint64List extends List<bigint> {
|
|
717
|
+
static readonly _capnp: _ListCtor;
|
|
718
|
+
get(index: number): bigint;
|
|
719
|
+
set(index: number, value: bigint): void;
|
|
720
|
+
[Symbol.toStringTag](): string;
|
|
721
|
+
}
|
|
722
|
+
declare const VoidList: ListCtor<Void>;
|
|
723
|
+
declare const getFloat32Mask: (x: number) => DataView;
|
|
724
|
+
declare const getFloat64Mask: (x: number) => DataView;
|
|
725
|
+
declare const getInt16Mask: (x: number) => DataView;
|
|
726
|
+
declare const getInt32Mask: (x: number) => DataView;
|
|
727
|
+
declare const getInt64Mask: (x: bigint) => DataView;
|
|
728
|
+
declare const getInt8Mask: (x: number) => DataView;
|
|
729
|
+
declare const getUint16Mask: (x: number) => DataView;
|
|
730
|
+
declare const getUint32Mask: (x: number) => DataView;
|
|
731
|
+
declare const getUint64Mask: (x: bigint) => DataView;
|
|
732
|
+
declare const getUint8Mask: (x: number) => DataView;
|
|
733
|
+
declare function getBitMask(value: boolean, bitOffset: number): DataView;
|
|
734
|
+
//#endregion
|
|
735
|
+
export { getInt64Mask as A, VoidList as C, getFloat64Mask as D, getFloat32Mask as E, getUint8Mask as F, utils as I, Pipeline as L, getUint16Mask as M, getUint32Mask as N, getInt16Mask as O, getUint64Mask as P, Void as S, getBitMask as T, TextList as _, DeferredTransport as a, Uint64List as b, Float64List as c, Int64List as d, Int8List as f, Text as g, Registry as h, DataList as i, getInt8Mask as j, getInt32Mask as k, Int16List as l, PointerList as m, BoolList as n, ErrorClient as o, InterfaceList as p, CompositeList as r, Float32List as s, AnyPointerList as t, Int32List as u, Uint16List as v, clientOrNull as w, Uint8List as x, Uint32List as y };
|
|
736
|
+
//# sourceMappingURL=index-LYXu6eWz.d.mts.map
|