@stryke/capnp 0.8.2 → 0.9.0

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.
@@ -0,0 +1,1454 @@
1
+ import { Struct, ObjectSize, ListCtor, Orphan, List, Data, Pointer } from 'capnp-es';
2
+
3
+ declare const _capnpFileId: bigint;
4
+ /**
5
+ * Information about one of the node's parameters.
6
+ *
7
+ */
8
+ declare class Node_Parameter extends Struct {
9
+ static readonly _capnp: {
10
+ displayName: string;
11
+ id: string;
12
+ size: ObjectSize;
13
+ };
14
+ get name(): string;
15
+ set name(value: string);
16
+ toString(): string;
17
+ }
18
+ declare class Node_NestedNode extends Struct {
19
+ static readonly _capnp: {
20
+ displayName: string;
21
+ id: string;
22
+ size: ObjectSize;
23
+ };
24
+ /**
25
+ * Unqualified symbol name. Unlike Node.displayName, this *can* be used programmatically.
26
+ *
27
+ * (On Zooko's triangle, this is the node's petname according to its parent scope.)
28
+ *
29
+ */
30
+ get name(): string;
31
+ set name(value: string);
32
+ /**
33
+ * ID of the nested node. Typically, the target node's scopeId points back to this node, but
34
+ * robust code should avoid relying on this.
35
+ *
36
+ */
37
+ get id(): bigint;
38
+ set id(value: bigint);
39
+ toString(): string;
40
+ }
41
+ declare class Node_SourceInfo_Member extends Struct {
42
+ static readonly _capnp: {
43
+ displayName: string;
44
+ id: string;
45
+ size: ObjectSize;
46
+ };
47
+ /**
48
+ * Doc comment on the member.
49
+ *
50
+ */
51
+ get docComment(): string;
52
+ set docComment(value: string);
53
+ toString(): string;
54
+ }
55
+ /**
56
+ * Additional information about a node which is not needed at runtime, but may be useful for
57
+ * documentation or debugging purposes. This is kept in a separate struct to make sure it
58
+ * doesn't accidentally get included in contexts where it is not needed. The
59
+ * `CodeGeneratorRequest` includes this information in a separate array.
60
+ *
61
+ */
62
+ declare class Node_SourceInfo extends Struct {
63
+ static readonly Member: typeof Node_SourceInfo_Member;
64
+ static readonly _capnp: {
65
+ displayName: string;
66
+ id: string;
67
+ size: ObjectSize;
68
+ };
69
+ static _Members: ListCtor<Node_SourceInfo_Member>;
70
+ /**
71
+ * ID of the Node which this info describes.
72
+ *
73
+ */
74
+ get id(): bigint;
75
+ set id(value: bigint);
76
+ /**
77
+ * The top-level doc comment for the Node.
78
+ *
79
+ */
80
+ get docComment(): string;
81
+ set docComment(value: string);
82
+ _adoptMembers(value: Orphan<List<Node_SourceInfo_Member>>): void;
83
+ _disownMembers(): Orphan<List<Node_SourceInfo_Member>>;
84
+ /**
85
+ * Information about each member -- i.e. fields (for structs), enumerants (for enums), or
86
+ * methods (for interfaces).
87
+ *
88
+ * This list is the same length and order as the corresponding list in the Node, i.e.
89
+ * Node.struct.fields, Node.enum.enumerants, or Node.interface.methods.
90
+ *
91
+ */
92
+ get members(): List<Node_SourceInfo_Member>;
93
+ _hasMembers(): boolean;
94
+ _initMembers(length: number): List<Node_SourceInfo_Member>;
95
+ set members(value: List<Node_SourceInfo_Member>);
96
+ toString(): string;
97
+ }
98
+ declare class Node_Struct extends Struct {
99
+ static readonly _capnp: {
100
+ displayName: string;
101
+ id: string;
102
+ size: ObjectSize;
103
+ };
104
+ static _Fields: ListCtor<Field>;
105
+ /**
106
+ * Size of the data section, in words.
107
+ *
108
+ */
109
+ get dataWordCount(): number;
110
+ set dataWordCount(value: number);
111
+ /**
112
+ * Size of the pointer section, in pointers (which are one word each).
113
+ *
114
+ */
115
+ get pointerCount(): number;
116
+ set pointerCount(value: number);
117
+ /**
118
+ * The preferred element size to use when encoding a list of this struct. If this is anything
119
+ * other than `inlineComposite` then the struct is one word or less in size and is a candidate
120
+ * for list packing optimization.
121
+ *
122
+ */
123
+ get preferredListEncoding(): ElementSize;
124
+ set preferredListEncoding(value: ElementSize);
125
+ /**
126
+ * If true, then this "struct" node is actually not an independent node, but merely represents
127
+ * some named union or group within a particular parent struct. This node's scopeId refers
128
+ * to the parent struct, which may itself be a union/group in yet another struct.
129
+ *
130
+ * All group nodes share the same dataWordCount and pointerCount as the top-level
131
+ * struct, and their fields live in the same ordinal and offset spaces as all other fields in
132
+ * the struct.
133
+ *
134
+ * Note that a named union is considered a special kind of group -- in fact, a named union
135
+ * is exactly equivalent to a group that contains nothing but an unnamed union.
136
+ *
137
+ */
138
+ get isGroup(): boolean;
139
+ set isGroup(value: boolean);
140
+ /**
141
+ * Number of fields in this struct which are members of an anonymous union, and thus may
142
+ * overlap. If this is non-zero, then a 16-bit discriminant is present indicating which
143
+ * of the overlapping fields is active. This can never be 1 -- if it is non-zero, it must be
144
+ * two or more.
145
+ *
146
+ * Note that the fields of an unnamed union are considered fields of the scope containing the
147
+ * union -- an unnamed union is not its own group. So, a top-level struct may contain a
148
+ * non-zero discriminant count. Named unions, on the other hand, are equivalent to groups
149
+ * containing unnamed unions. So, a named union has its own independent schema node, with
150
+ * `isGroup` = true.
151
+ *
152
+ */
153
+ get discriminantCount(): number;
154
+ set discriminantCount(value: number);
155
+ /**
156
+ * If `discriminantCount` is non-zero, this is the offset of the union discriminant, in
157
+ * multiples of 16 bits.
158
+ *
159
+ */
160
+ get discriminantOffset(): number;
161
+ set discriminantOffset(value: number);
162
+ _adoptFields(value: Orphan<List<Field>>): void;
163
+ _disownFields(): Orphan<List<Field>>;
164
+ /**
165
+ * Fields defined within this scope (either the struct's top-level fields, or the fields of
166
+ * a particular group; see `isGroup`).
167
+ *
168
+ * The fields are sorted by ordinal number, but note that because groups share the same
169
+ * ordinal space, the field's index in this list is not necessarily exactly its ordinal.
170
+ * On the other hand, the field's position in this list does remain the same even as the
171
+ * protocol evolves, since it is not possible to insert or remove an earlier ordinal.
172
+ * Therefore, for most use cases, if you want to identify a field by number, it may make the
173
+ * most sense to use the field's index in this list rather than its ordinal.
174
+ *
175
+ */
176
+ get fields(): List<Field>;
177
+ _hasFields(): boolean;
178
+ _initFields(length: number): List<Field>;
179
+ set fields(value: List<Field>);
180
+ toString(): string;
181
+ }
182
+ declare class Node_Enum extends Struct {
183
+ static readonly _capnp: {
184
+ displayName: string;
185
+ id: string;
186
+ size: ObjectSize;
187
+ };
188
+ static _Enumerants: ListCtor<Enumerant>;
189
+ _adoptEnumerants(value: Orphan<List<Enumerant>>): void;
190
+ _disownEnumerants(): Orphan<List<Enumerant>>;
191
+ /**
192
+ * Enumerants ordered by numeric value (ordinal).
193
+ *
194
+ */
195
+ get enumerants(): List<Enumerant>;
196
+ _hasEnumerants(): boolean;
197
+ _initEnumerants(length: number): List<Enumerant>;
198
+ set enumerants(value: List<Enumerant>);
199
+ toString(): string;
200
+ }
201
+ declare class Node_Interface extends Struct {
202
+ static readonly _capnp: {
203
+ displayName: string;
204
+ id: string;
205
+ size: ObjectSize;
206
+ };
207
+ static _Methods: ListCtor<Method>;
208
+ static _Superclasses: ListCtor<Superclass>;
209
+ _adoptMethods(value: Orphan<List<Method>>): void;
210
+ _disownMethods(): Orphan<List<Method>>;
211
+ /**
212
+ * Methods ordered by ordinal.
213
+ *
214
+ */
215
+ get methods(): List<Method>;
216
+ _hasMethods(): boolean;
217
+ _initMethods(length: number): List<Method>;
218
+ set methods(value: List<Method>);
219
+ _adoptSuperclasses(value: Orphan<List<Superclass>>): void;
220
+ _disownSuperclasses(): Orphan<List<Superclass>>;
221
+ /**
222
+ * Superclasses of this interface.
223
+ *
224
+ */
225
+ get superclasses(): List<Superclass>;
226
+ _hasSuperclasses(): boolean;
227
+ _initSuperclasses(length: number): List<Superclass>;
228
+ set superclasses(value: List<Superclass>);
229
+ toString(): string;
230
+ }
231
+ declare class Node_Const extends Struct {
232
+ static readonly _capnp: {
233
+ displayName: string;
234
+ id: string;
235
+ size: ObjectSize;
236
+ };
237
+ _adoptType(value: Orphan<Type>): void;
238
+ _disownType(): Orphan<Type>;
239
+ get type(): Type;
240
+ _hasType(): boolean;
241
+ _initType(): Type;
242
+ set type(value: Type);
243
+ _adoptValue(value: Orphan<Value>): void;
244
+ _disownValue(): Orphan<Value>;
245
+ get value(): Value;
246
+ _hasValue(): boolean;
247
+ _initValue(): Value;
248
+ set value(value: Value);
249
+ toString(): string;
250
+ }
251
+ declare class Node_Annotation extends Struct {
252
+ static readonly _capnp: {
253
+ displayName: string;
254
+ id: string;
255
+ size: ObjectSize;
256
+ };
257
+ _adoptType(value: Orphan<Type>): void;
258
+ _disownType(): Orphan<Type>;
259
+ get type(): Type;
260
+ _hasType(): boolean;
261
+ _initType(): Type;
262
+ set type(value: Type);
263
+ get targetsFile(): boolean;
264
+ set targetsFile(value: boolean);
265
+ get targetsConst(): boolean;
266
+ set targetsConst(value: boolean);
267
+ get targetsEnum(): boolean;
268
+ set targetsEnum(value: boolean);
269
+ get targetsEnumerant(): boolean;
270
+ set targetsEnumerant(value: boolean);
271
+ get targetsStruct(): boolean;
272
+ set targetsStruct(value: boolean);
273
+ get targetsField(): boolean;
274
+ set targetsField(value: boolean);
275
+ get targetsUnion(): boolean;
276
+ set targetsUnion(value: boolean);
277
+ get targetsGroup(): boolean;
278
+ set targetsGroup(value: boolean);
279
+ get targetsInterface(): boolean;
280
+ set targetsInterface(value: boolean);
281
+ get targetsMethod(): boolean;
282
+ set targetsMethod(value: boolean);
283
+ get targetsParam(): boolean;
284
+ set targetsParam(value: boolean);
285
+ get targetsAnnotation(): boolean;
286
+ set targetsAnnotation(value: boolean);
287
+ toString(): string;
288
+ }
289
+ declare const Node_Which: {
290
+ readonly FILE: 0;
291
+ /**
292
+ * Name to present to humans to identify this Node. You should not attempt to parse this. Its
293
+ * format could change. It is not guaranteed to be unique.
294
+ *
295
+ * (On Zooko's triangle, this is the node's nickname.)
296
+ *
297
+ */
298
+ readonly STRUCT: 1;
299
+ /**
300
+ * If you want a shorter version of `displayName` (just naming this node, without its surrounding
301
+ * scope), chop off this many characters from the beginning of `displayName`.
302
+ *
303
+ */
304
+ readonly ENUM: 2;
305
+ /**
306
+ * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back
307
+ * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not
308
+ * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is
309
+ * zero if the node has no parent, which is normally only the case with files, but should be
310
+ * allowed for any kind of node (in order to make runtime type generation easier).
311
+ *
312
+ */
313
+ readonly INTERFACE: 3;
314
+ /**
315
+ * List of nodes nested within this node, along with the names under which they were declared.
316
+ *
317
+ */
318
+ readonly CONST: 4;
319
+ /**
320
+ * Annotations applied to this node.
321
+ *
322
+ */
323
+ readonly ANNOTATION: 5;
324
+ };
325
+ type Node_Which = (typeof Node_Which)[keyof typeof Node_Which];
326
+ declare class Node extends Struct {
327
+ static readonly FILE: 0;
328
+ static readonly STRUCT: 1;
329
+ static readonly ENUM: 2;
330
+ static readonly INTERFACE: 3;
331
+ static readonly CONST: 4;
332
+ static readonly ANNOTATION: 5;
333
+ static readonly Parameter: typeof Node_Parameter;
334
+ static readonly NestedNode: typeof Node_NestedNode;
335
+ static readonly SourceInfo: typeof Node_SourceInfo;
336
+ static readonly _capnp: {
337
+ displayName: string;
338
+ id: string;
339
+ size: ObjectSize;
340
+ };
341
+ static _Parameters: ListCtor<Node_Parameter>;
342
+ static _NestedNodes: ListCtor<Node_NestedNode>;
343
+ static _Annotations: ListCtor<Annotation>;
344
+ get id(): bigint;
345
+ set id(value: bigint);
346
+ /**
347
+ * Name to present to humans to identify this Node. You should not attempt to parse this. Its
348
+ * format could change. It is not guaranteed to be unique.
349
+ *
350
+ * (On Zooko's triangle, this is the node's nickname.)
351
+ *
352
+ */
353
+ get displayName(): string;
354
+ set displayName(value: string);
355
+ /**
356
+ * If you want a shorter version of `displayName` (just naming this node, without its surrounding
357
+ * scope), chop off this many characters from the beginning of `displayName`.
358
+ *
359
+ */
360
+ get displayNamePrefixLength(): number;
361
+ set displayNamePrefixLength(value: number);
362
+ /**
363
+ * ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back
364
+ * at this node, but robust code should avoid relying on this (and, in fact, group nodes are not
365
+ * listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is
366
+ * zero if the node has no parent, which is normally only the case with files, but should be
367
+ * allowed for any kind of node (in order to make runtime type generation easier).
368
+ *
369
+ */
370
+ get scopeId(): bigint;
371
+ set scopeId(value: bigint);
372
+ _adoptParameters(value: Orphan<List<Node_Parameter>>): void;
373
+ _disownParameters(): Orphan<List<Node_Parameter>>;
374
+ /**
375
+ * If this node is parameterized (generic), the list of parameters. Empty for non-generic types.
376
+ *
377
+ */
378
+ get parameters(): List<Node_Parameter>;
379
+ _hasParameters(): boolean;
380
+ _initParameters(length: number): List<Node_Parameter>;
381
+ set parameters(value: List<Node_Parameter>);
382
+ /**
383
+ * True if this node is generic, meaning that it or one of its parent scopes has a non-empty
384
+ * `parameters`.
385
+ *
386
+ */
387
+ get isGeneric(): boolean;
388
+ set isGeneric(value: boolean);
389
+ _adoptNestedNodes(value: Orphan<List<Node_NestedNode>>): void;
390
+ _disownNestedNodes(): Orphan<List<Node_NestedNode>>;
391
+ /**
392
+ * List of nodes nested within this node, along with the names under which they were declared.
393
+ *
394
+ */
395
+ get nestedNodes(): List<Node_NestedNode>;
396
+ _hasNestedNodes(): boolean;
397
+ _initNestedNodes(length: number): List<Node_NestedNode>;
398
+ set nestedNodes(value: List<Node_NestedNode>);
399
+ _adoptAnnotations(value: Orphan<List<Annotation>>): void;
400
+ _disownAnnotations(): Orphan<List<Annotation>>;
401
+ /**
402
+ * Annotations applied to this node.
403
+ *
404
+ */
405
+ get annotations(): List<Annotation>;
406
+ _hasAnnotations(): boolean;
407
+ _initAnnotations(length: number): List<Annotation>;
408
+ set annotations(value: List<Annotation>);
409
+ get _isFile(): boolean;
410
+ set file(_: true);
411
+ get struct(): Node_Struct;
412
+ _initStruct(): Node_Struct;
413
+ get _isStruct(): boolean;
414
+ set struct(_: true);
415
+ get enum(): Node_Enum;
416
+ _initEnum(): Node_Enum;
417
+ get _isEnum(): boolean;
418
+ set enum(_: true);
419
+ get interface(): Node_Interface;
420
+ _initInterface(): Node_Interface;
421
+ get _isInterface(): boolean;
422
+ set interface(_: true);
423
+ get const(): Node_Const;
424
+ _initConst(): Node_Const;
425
+ get _isConst(): boolean;
426
+ set const(_: true);
427
+ get annotation(): Node_Annotation;
428
+ _initAnnotation(): Node_Annotation;
429
+ get _isAnnotation(): boolean;
430
+ set annotation(_: true);
431
+ toString(): string;
432
+ which(): Node_Which;
433
+ }
434
+ /**
435
+ * A regular, non-group, non-fixed-list field.
436
+ *
437
+ */
438
+ declare class Field_Slot extends Struct {
439
+ static readonly _capnp: {
440
+ displayName: string;
441
+ id: string;
442
+ size: ObjectSize;
443
+ };
444
+ /**
445
+ * Offset, in units of the field's size, from the beginning of the section in which the field
446
+ * resides. E.g. for a UInt32 field, multiply this by 4 to get the byte offset from the
447
+ * beginning of the data section.
448
+ *
449
+ */
450
+ get offset(): number;
451
+ set offset(value: number);
452
+ _adoptType(value: Orphan<Type>): void;
453
+ _disownType(): Orphan<Type>;
454
+ get type(): Type;
455
+ _hasType(): boolean;
456
+ _initType(): Type;
457
+ set type(value: Type);
458
+ _adoptDefaultValue(value: Orphan<Value>): void;
459
+ _disownDefaultValue(): Orphan<Value>;
460
+ get defaultValue(): Value;
461
+ _hasDefaultValue(): boolean;
462
+ _initDefaultValue(): Value;
463
+ set defaultValue(value: Value);
464
+ /**
465
+ * Whether the default value was specified explicitly. Non-explicit default values are always
466
+ * zero or empty values. Usually, whether the default value was explicit shouldn't matter.
467
+ * The main use case for this flag is for structs representing method parameters:
468
+ * explicitly-defaulted parameters may be allowed to be omitted when calling the method.
469
+ *
470
+ */
471
+ get hadExplicitDefault(): boolean;
472
+ set hadExplicitDefault(value: boolean);
473
+ toString(): string;
474
+ }
475
+ /**
476
+ * A group.
477
+ *
478
+ */
479
+ declare class Field_Group extends Struct {
480
+ static readonly _capnp: {
481
+ displayName: string;
482
+ id: string;
483
+ size: ObjectSize;
484
+ };
485
+ /**
486
+ * The ID of the group's node.
487
+ *
488
+ */
489
+ get typeId(): bigint;
490
+ set typeId(value: bigint);
491
+ toString(): string;
492
+ }
493
+ declare const Field_Ordinal_Which: {
494
+ readonly IMPLICIT: 0;
495
+ /**
496
+ * The original ordinal number given to the field. You probably should NOT use this; if you need
497
+ * a numeric identifier for a field, use its position within the field array for its scope.
498
+ * The ordinal is given here mainly just so that the original schema text can be reproduced given
499
+ * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.
500
+ *
501
+ */
502
+ readonly EXPLICIT: 1;
503
+ };
504
+ type Field_Ordinal_Which = (typeof Field_Ordinal_Which)[keyof typeof Field_Ordinal_Which];
505
+ declare class Field_Ordinal extends Struct {
506
+ static readonly IMPLICIT: 0;
507
+ static readonly EXPLICIT: 1;
508
+ static readonly _capnp: {
509
+ displayName: string;
510
+ id: string;
511
+ size: ObjectSize;
512
+ };
513
+ get _isImplicit(): boolean;
514
+ set implicit(_: true);
515
+ /**
516
+ * The original ordinal number given to the field. You probably should NOT use this; if you need
517
+ * a numeric identifier for a field, use its position within the field array for its scope.
518
+ * The ordinal is given here mainly just so that the original schema text can be reproduced given
519
+ * the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.
520
+ *
521
+ */
522
+ get explicit(): number;
523
+ get _isExplicit(): boolean;
524
+ set explicit(value: number);
525
+ toString(): string;
526
+ which(): Field_Ordinal_Which;
527
+ }
528
+ declare const Field_Which: {
529
+ readonly SLOT: 0;
530
+ /**
531
+ * Indicates where this member appeared in the code, relative to other members.
532
+ * Code ordering may have semantic relevance -- programmers tend to place related fields
533
+ * together. So, using code ordering makes sense in human-readable formats where ordering is
534
+ * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum
535
+ * value is count(members) - 1. Fields that are members of a union are only ordered relative to
536
+ * the other members of that union, so the maximum value there is count(union.members).
537
+ *
538
+ */
539
+ readonly GROUP: 1;
540
+ };
541
+ type Field_Which = (typeof Field_Which)[keyof typeof Field_Which];
542
+ /**
543
+ * Schema for a field of a struct.
544
+ *
545
+ */
546
+ declare class Field extends Struct {
547
+ static readonly NO_DISCRIMINANT = 65535;
548
+ static readonly SLOT: 0;
549
+ static readonly GROUP: 1;
550
+ static readonly _capnp: {
551
+ displayName: string;
552
+ id: string;
553
+ size: ObjectSize;
554
+ defaultDiscriminantValue: DataView<ArrayBufferLike>;
555
+ };
556
+ static _Annotations: ListCtor<Annotation>;
557
+ get name(): string;
558
+ set name(value: string);
559
+ /**
560
+ * Indicates where this member appeared in the code, relative to other members.
561
+ * Code ordering may have semantic relevance -- programmers tend to place related fields
562
+ * together. So, using code ordering makes sense in human-readable formats where ordering is
563
+ * otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum
564
+ * value is count(members) - 1. Fields that are members of a union are only ordered relative to
565
+ * the other members of that union, so the maximum value there is count(union.members).
566
+ *
567
+ */
568
+ get codeOrder(): number;
569
+ set codeOrder(value: number);
570
+ _adoptAnnotations(value: Orphan<List<Annotation>>): void;
571
+ _disownAnnotations(): Orphan<List<Annotation>>;
572
+ get annotations(): List<Annotation>;
573
+ _hasAnnotations(): boolean;
574
+ _initAnnotations(length: number): List<Annotation>;
575
+ set annotations(value: List<Annotation>);
576
+ /**
577
+ * If the field is in a union, this is the value which the union's discriminant should take when
578
+ * the field is active. If the field is not in a union, this is 0xffff.
579
+ *
580
+ */
581
+ get discriminantValue(): number;
582
+ set discriminantValue(value: number);
583
+ /**
584
+ * A regular, non-group, non-fixed-list field.
585
+ *
586
+ */
587
+ get slot(): Field_Slot;
588
+ _initSlot(): Field_Slot;
589
+ get _isSlot(): boolean;
590
+ set slot(_: true);
591
+ /**
592
+ * A group.
593
+ *
594
+ */
595
+ get group(): Field_Group;
596
+ _initGroup(): Field_Group;
597
+ get _isGroup(): boolean;
598
+ set group(_: true);
599
+ get ordinal(): Field_Ordinal;
600
+ _initOrdinal(): Field_Ordinal;
601
+ toString(): string;
602
+ which(): Field_Which;
603
+ }
604
+ /**
605
+ * Schema for member of an enum.
606
+ *
607
+ */
608
+ declare class Enumerant extends Struct {
609
+ static readonly _capnp: {
610
+ displayName: string;
611
+ id: string;
612
+ size: ObjectSize;
613
+ };
614
+ static _Annotations: ListCtor<Annotation>;
615
+ get name(): string;
616
+ set name(value: string);
617
+ /**
618
+ * Specifies order in which the enumerants were declared in the code.
619
+ * Like utils.Field.codeOrder.
620
+ *
621
+ */
622
+ get codeOrder(): number;
623
+ set codeOrder(value: number);
624
+ _adoptAnnotations(value: Orphan<List<Annotation>>): void;
625
+ _disownAnnotations(): Orphan<List<Annotation>>;
626
+ get annotations(): List<Annotation>;
627
+ _hasAnnotations(): boolean;
628
+ _initAnnotations(length: number): List<Annotation>;
629
+ set annotations(value: List<Annotation>);
630
+ toString(): string;
631
+ }
632
+ declare class Superclass extends Struct {
633
+ static readonly _capnp: {
634
+ displayName: string;
635
+ id: string;
636
+ size: ObjectSize;
637
+ };
638
+ get id(): bigint;
639
+ set id(value: bigint);
640
+ _adoptBrand(value: Orphan<Brand>): void;
641
+ _disownBrand(): Orphan<Brand>;
642
+ get brand(): Brand;
643
+ _hasBrand(): boolean;
644
+ _initBrand(): Brand;
645
+ set brand(value: Brand);
646
+ toString(): string;
647
+ }
648
+ /**
649
+ * Schema for method of an interface.
650
+ *
651
+ */
652
+ declare class Method extends Struct {
653
+ static readonly _capnp: {
654
+ displayName: string;
655
+ id: string;
656
+ size: ObjectSize;
657
+ };
658
+ static _ImplicitParameters: ListCtor<Node_Parameter>;
659
+ static _Annotations: ListCtor<Annotation>;
660
+ get name(): string;
661
+ set name(value: string);
662
+ /**
663
+ * Specifies order in which the methods were declared in the code.
664
+ * Like utils.Field.codeOrder.
665
+ *
666
+ */
667
+ get codeOrder(): number;
668
+ set codeOrder(value: number);
669
+ _adoptImplicitParameters(value: Orphan<List<Node_Parameter>>): void;
670
+ _disownImplicitParameters(): Orphan<List<Node_Parameter>>;
671
+ /**
672
+ * The parameters listed in [] (typically, type / generic parameters), whose bindings are intended
673
+ * to be inferred rather than specified explicitly, although not all languages support this.
674
+ *
675
+ */
676
+ get implicitParameters(): List<Node_Parameter>;
677
+ _hasImplicitParameters(): boolean;
678
+ _initImplicitParameters(length: number): List<Node_Parameter>;
679
+ set implicitParameters(value: List<Node_Parameter>);
680
+ /**
681
+ * ID of the parameter struct type. If a named parameter list was specified in the method
682
+ * declaration (rather than a single struct parameter type) then a corresponding struct type is
683
+ * auto-generated. Such an auto-generated type will not be listed in the interface's
684
+ * `nestedNodes` and its `scopeId` will be zero -- it is completely detached from the namespace.
685
+ * (Awkwardly, it does of course inherit generic parameters from the method's scope, which makes
686
+ * this a situation where you can't just climb the scope chain to find where a particular
687
+ * generic parameter was introduced. Making the `scopeId` zero was a mistake.)
688
+ *
689
+ */
690
+ get paramStructType(): bigint;
691
+ set paramStructType(value: bigint);
692
+ _adoptParamBrand(value: Orphan<Brand>): void;
693
+ _disownParamBrand(): Orphan<Brand>;
694
+ /**
695
+ * Brand of param struct type.
696
+ *
697
+ */
698
+ get paramBrand(): Brand;
699
+ _hasParamBrand(): boolean;
700
+ _initParamBrand(): Brand;
701
+ set paramBrand(value: Brand);
702
+ /**
703
+ * ID of the return struct type; similar to `paramStructType`.
704
+ *
705
+ */
706
+ get resultStructType(): bigint;
707
+ set resultStructType(value: bigint);
708
+ _adoptResultBrand(value: Orphan<Brand>): void;
709
+ _disownResultBrand(): Orphan<Brand>;
710
+ /**
711
+ * Brand of result struct type.
712
+ *
713
+ */
714
+ get resultBrand(): Brand;
715
+ _hasResultBrand(): boolean;
716
+ _initResultBrand(): Brand;
717
+ set resultBrand(value: Brand);
718
+ _adoptAnnotations(value: Orphan<List<Annotation>>): void;
719
+ _disownAnnotations(): Orphan<List<Annotation>>;
720
+ get annotations(): List<Annotation>;
721
+ _hasAnnotations(): boolean;
722
+ _initAnnotations(length: number): List<Annotation>;
723
+ set annotations(value: List<Annotation>);
724
+ toString(): string;
725
+ }
726
+ declare class Type_List extends Struct {
727
+ static readonly _capnp: {
728
+ displayName: string;
729
+ id: string;
730
+ size: ObjectSize;
731
+ };
732
+ _adoptElementType(value: Orphan<Type>): void;
733
+ _disownElementType(): Orphan<Type>;
734
+ get elementType(): Type;
735
+ _hasElementType(): boolean;
736
+ _initElementType(): Type;
737
+ set elementType(value: Type);
738
+ toString(): string;
739
+ }
740
+ declare class Type_Enum extends Struct {
741
+ static readonly _capnp: {
742
+ displayName: string;
743
+ id: string;
744
+ size: ObjectSize;
745
+ };
746
+ get typeId(): bigint;
747
+ set typeId(value: bigint);
748
+ _adoptBrand(value: Orphan<Brand>): void;
749
+ _disownBrand(): Orphan<Brand>;
750
+ get brand(): Brand;
751
+ _hasBrand(): boolean;
752
+ _initBrand(): Brand;
753
+ set brand(value: Brand);
754
+ toString(): string;
755
+ }
756
+ declare class Type_Struct extends Struct {
757
+ static readonly _capnp: {
758
+ displayName: string;
759
+ id: string;
760
+ size: ObjectSize;
761
+ };
762
+ get typeId(): bigint;
763
+ set typeId(value: bigint);
764
+ _adoptBrand(value: Orphan<Brand>): void;
765
+ _disownBrand(): Orphan<Brand>;
766
+ get brand(): Brand;
767
+ _hasBrand(): boolean;
768
+ _initBrand(): Brand;
769
+ set brand(value: Brand);
770
+ toString(): string;
771
+ }
772
+ declare class Type_Interface extends Struct {
773
+ static readonly _capnp: {
774
+ displayName: string;
775
+ id: string;
776
+ size: ObjectSize;
777
+ };
778
+ get typeId(): bigint;
779
+ set typeId(value: bigint);
780
+ _adoptBrand(value: Orphan<Brand>): void;
781
+ _disownBrand(): Orphan<Brand>;
782
+ get brand(): Brand;
783
+ _hasBrand(): boolean;
784
+ _initBrand(): Brand;
785
+ set brand(value: Brand);
786
+ toString(): string;
787
+ }
788
+ declare const Type_AnyPointer_Unconstrained_Which: {
789
+ /**
790
+ * truly AnyPointer
791
+ *
792
+ */
793
+ readonly ANY_KIND: 0;
794
+ /**
795
+ * AnyStruct
796
+ *
797
+ */
798
+ readonly STRUCT: 1;
799
+ /**
800
+ * AnyList
801
+ *
802
+ */
803
+ readonly LIST: 2;
804
+ /**
805
+ * Capability
806
+ *
807
+ */
808
+ readonly CAPABILITY: 3;
809
+ };
810
+ type Type_AnyPointer_Unconstrained_Which = (typeof Type_AnyPointer_Unconstrained_Which)[keyof typeof Type_AnyPointer_Unconstrained_Which];
811
+ /**
812
+ * A regular AnyPointer.
813
+ *
814
+ * The name "unconstrained" means as opposed to constraining it to match a type parameter.
815
+ * In retrospect this name is probably a poor choice given that it may still be constrained
816
+ * to be a struct, list, or capability.
817
+ *
818
+ */
819
+ declare class Type_AnyPointer_Unconstrained extends Struct {
820
+ static readonly ANY_KIND: 0;
821
+ static readonly STRUCT: 1;
822
+ static readonly LIST: 2;
823
+ static readonly CAPABILITY: 3;
824
+ static readonly _capnp: {
825
+ displayName: string;
826
+ id: string;
827
+ size: ObjectSize;
828
+ };
829
+ get _isAnyKind(): boolean;
830
+ set anyKind(_: true);
831
+ get _isStruct(): boolean;
832
+ set struct(_: true);
833
+ get _isList(): boolean;
834
+ set list(_: true);
835
+ get _isCapability(): boolean;
836
+ set capability(_: true);
837
+ toString(): string;
838
+ which(): Type_AnyPointer_Unconstrained_Which;
839
+ }
840
+ /**
841
+ * This is actually a reference to a type parameter defined within this scope.
842
+ *
843
+ */
844
+ declare class Type_AnyPointer_Parameter extends Struct {
845
+ static readonly _capnp: {
846
+ displayName: string;
847
+ id: string;
848
+ size: ObjectSize;
849
+ };
850
+ /**
851
+ * ID of the generic type whose parameter we're referencing. This should be a parent of the
852
+ * current scope.
853
+ *
854
+ */
855
+ get scopeId(): bigint;
856
+ set scopeId(value: bigint);
857
+ /**
858
+ * Index of the parameter within the generic type's parameter list.
859
+ *
860
+ */
861
+ get parameterIndex(): number;
862
+ set parameterIndex(value: number);
863
+ toString(): string;
864
+ }
865
+ /**
866
+ * This is actually a reference to an implicit (generic) parameter of a method. The only
867
+ * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.
868
+ *
869
+ */
870
+ declare class Type_AnyPointer_ImplicitMethodParameter extends Struct {
871
+ static readonly _capnp: {
872
+ displayName: string;
873
+ id: string;
874
+ size: ObjectSize;
875
+ };
876
+ get parameterIndex(): number;
877
+ set parameterIndex(value: number);
878
+ toString(): string;
879
+ }
880
+ declare const Type_AnyPointer_Which: {
881
+ /**
882
+ * A regular AnyPointer.
883
+ *
884
+ * The name "unconstrained" means as opposed to constraining it to match a type parameter.
885
+ * In retrospect this name is probably a poor choice given that it may still be constrained
886
+ * to be a struct, list, or capability.
887
+ *
888
+ */
889
+ readonly UNCONSTRAINED: 0;
890
+ /**
891
+ * This is actually a reference to a type parameter defined within this scope.
892
+ *
893
+ */
894
+ readonly PARAMETER: 1;
895
+ /**
896
+ * This is actually a reference to an implicit (generic) parameter of a method. The only
897
+ * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.
898
+ *
899
+ */
900
+ readonly IMPLICIT_METHOD_PARAMETER: 2;
901
+ };
902
+ type Type_AnyPointer_Which = (typeof Type_AnyPointer_Which)[keyof typeof Type_AnyPointer_Which];
903
+ declare class Type_AnyPointer extends Struct {
904
+ static readonly UNCONSTRAINED: 0;
905
+ static readonly PARAMETER: 1;
906
+ static readonly IMPLICIT_METHOD_PARAMETER: 2;
907
+ static readonly _capnp: {
908
+ displayName: string;
909
+ id: string;
910
+ size: ObjectSize;
911
+ };
912
+ /**
913
+ * A regular AnyPointer.
914
+ *
915
+ * The name "unconstrained" means as opposed to constraining it to match a type parameter.
916
+ * In retrospect this name is probably a poor choice given that it may still be constrained
917
+ * to be a struct, list, or capability.
918
+ *
919
+ */
920
+ get unconstrained(): Type_AnyPointer_Unconstrained;
921
+ _initUnconstrained(): Type_AnyPointer_Unconstrained;
922
+ get _isUnconstrained(): boolean;
923
+ set unconstrained(_: true);
924
+ /**
925
+ * This is actually a reference to a type parameter defined within this scope.
926
+ *
927
+ */
928
+ get parameter(): Type_AnyPointer_Parameter;
929
+ _initParameter(): Type_AnyPointer_Parameter;
930
+ get _isParameter(): boolean;
931
+ set parameter(_: true);
932
+ /**
933
+ * This is actually a reference to an implicit (generic) parameter of a method. The only
934
+ * legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.
935
+ *
936
+ */
937
+ get implicitMethodParameter(): Type_AnyPointer_ImplicitMethodParameter;
938
+ _initImplicitMethodParameter(): Type_AnyPointer_ImplicitMethodParameter;
939
+ get _isImplicitMethodParameter(): boolean;
940
+ set implicitMethodParameter(_: true);
941
+ toString(): string;
942
+ which(): Type_AnyPointer_Which;
943
+ }
944
+ declare const Type_Which: {
945
+ readonly VOID: 0;
946
+ readonly BOOL: 1;
947
+ readonly INT8: 2;
948
+ readonly INT16: 3;
949
+ readonly INT32: 4;
950
+ readonly INT64: 5;
951
+ readonly UINT8: 6;
952
+ readonly UINT16: 7;
953
+ readonly UINT32: 8;
954
+ readonly UINT64: 9;
955
+ readonly FLOAT32: 10;
956
+ readonly FLOAT64: 11;
957
+ readonly TEXT: 12;
958
+ readonly DATA: 13;
959
+ readonly LIST: 14;
960
+ readonly ENUM: 15;
961
+ readonly STRUCT: 16;
962
+ readonly INTERFACE: 17;
963
+ readonly ANY_POINTER: 18;
964
+ };
965
+ type Type_Which = (typeof Type_Which)[keyof typeof Type_Which];
966
+ /**
967
+ * Represents a type expression.
968
+ *
969
+ */
970
+ declare class Type extends Struct {
971
+ static readonly VOID: 0;
972
+ static readonly BOOL: 1;
973
+ static readonly INT8: 2;
974
+ static readonly INT16: 3;
975
+ static readonly INT32: 4;
976
+ static readonly INT64: 5;
977
+ static readonly UINT8: 6;
978
+ static readonly UINT16: 7;
979
+ static readonly UINT32: 8;
980
+ static readonly UINT64: 9;
981
+ static readonly FLOAT32: 10;
982
+ static readonly FLOAT64: 11;
983
+ static readonly TEXT: 12;
984
+ static readonly DATA: 13;
985
+ static readonly LIST: 14;
986
+ static readonly ENUM: 15;
987
+ static readonly STRUCT: 16;
988
+ static readonly INTERFACE: 17;
989
+ static readonly ANY_POINTER: 18;
990
+ static readonly _capnp: {
991
+ displayName: string;
992
+ id: string;
993
+ size: ObjectSize;
994
+ };
995
+ get _isVoid(): boolean;
996
+ set void(_: true);
997
+ get _isBool(): boolean;
998
+ set bool(_: true);
999
+ get _isInt8(): boolean;
1000
+ set int8(_: true);
1001
+ get _isInt16(): boolean;
1002
+ set int16(_: true);
1003
+ get _isInt32(): boolean;
1004
+ set int32(_: true);
1005
+ get _isInt64(): boolean;
1006
+ set int64(_: true);
1007
+ get _isUint8(): boolean;
1008
+ set uint8(_: true);
1009
+ get _isUint16(): boolean;
1010
+ set uint16(_: true);
1011
+ get _isUint32(): boolean;
1012
+ set uint32(_: true);
1013
+ get _isUint64(): boolean;
1014
+ set uint64(_: true);
1015
+ get _isFloat32(): boolean;
1016
+ set float32(_: true);
1017
+ get _isFloat64(): boolean;
1018
+ set float64(_: true);
1019
+ get _isText(): boolean;
1020
+ set text(_: true);
1021
+ get _isData(): boolean;
1022
+ set data(_: true);
1023
+ get list(): Type_List;
1024
+ _initList(): Type_List;
1025
+ get _isList(): boolean;
1026
+ set list(_: true);
1027
+ get enum(): Type_Enum;
1028
+ _initEnum(): Type_Enum;
1029
+ get _isEnum(): boolean;
1030
+ set enum(_: true);
1031
+ get struct(): Type_Struct;
1032
+ _initStruct(): Type_Struct;
1033
+ get _isStruct(): boolean;
1034
+ set struct(_: true);
1035
+ get interface(): Type_Interface;
1036
+ _initInterface(): Type_Interface;
1037
+ get _isInterface(): boolean;
1038
+ set interface(_: true);
1039
+ get anyPointer(): Type_AnyPointer;
1040
+ _initAnyPointer(): Type_AnyPointer;
1041
+ get _isAnyPointer(): boolean;
1042
+ set anyPointer(_: true);
1043
+ toString(): string;
1044
+ which(): Type_Which;
1045
+ }
1046
+ declare const Brand_Scope_Which: {
1047
+ /**
1048
+ * ID of the scope to which these params apply.
1049
+ *
1050
+ */
1051
+ readonly BIND: 0;
1052
+ /**
1053
+ * List of parameter bindings.
1054
+ *
1055
+ */
1056
+ readonly INHERIT: 1;
1057
+ };
1058
+ type Brand_Scope_Which = (typeof Brand_Scope_Which)[keyof typeof Brand_Scope_Which];
1059
+ declare class Brand_Scope extends Struct {
1060
+ static readonly BIND: 0;
1061
+ static readonly INHERIT: 1;
1062
+ static readonly _capnp: {
1063
+ displayName: string;
1064
+ id: string;
1065
+ size: ObjectSize;
1066
+ };
1067
+ static _Bind: ListCtor<Brand_Binding>;
1068
+ /**
1069
+ * ID of the scope to which these params apply.
1070
+ *
1071
+ */
1072
+ get scopeId(): bigint;
1073
+ set scopeId(value: bigint);
1074
+ _adoptBind(value: Orphan<List<Brand_Binding>>): void;
1075
+ _disownBind(): Orphan<List<Brand_Binding>>;
1076
+ /**
1077
+ * List of parameter bindings.
1078
+ *
1079
+ */
1080
+ get bind(): List<Brand_Binding>;
1081
+ _hasBind(): boolean;
1082
+ _initBind(length: number): List<Brand_Binding>;
1083
+ get _isBind(): boolean;
1084
+ set bind(value: List<Brand_Binding>);
1085
+ get _isInherit(): boolean;
1086
+ set inherit(_: true);
1087
+ toString(): string;
1088
+ which(): Brand_Scope_Which;
1089
+ }
1090
+ declare const Brand_Binding_Which: {
1091
+ readonly UNBOUND: 0;
1092
+ readonly TYPE: 1;
1093
+ };
1094
+ type Brand_Binding_Which = (typeof Brand_Binding_Which)[keyof typeof Brand_Binding_Which];
1095
+ declare class Brand_Binding extends Struct {
1096
+ static readonly UNBOUND: 0;
1097
+ static readonly TYPE: 1;
1098
+ static readonly _capnp: {
1099
+ displayName: string;
1100
+ id: string;
1101
+ size: ObjectSize;
1102
+ };
1103
+ get _isUnbound(): boolean;
1104
+ set unbound(_: true);
1105
+ _adoptType(value: Orphan<Type>): void;
1106
+ _disownType(): Orphan<Type>;
1107
+ get type(): Type;
1108
+ _hasType(): boolean;
1109
+ _initType(): Type;
1110
+ get _isType(): boolean;
1111
+ set type(value: Type);
1112
+ toString(): string;
1113
+ which(): Brand_Binding_Which;
1114
+ }
1115
+ /**
1116
+ * Specifies bindings for parameters of generics. Since these bindings turn a generic into a
1117
+ * non-generic, we call it the "brand".
1118
+ *
1119
+ */
1120
+ declare class Brand extends Struct {
1121
+ static readonly Scope: typeof Brand_Scope;
1122
+ static readonly Binding: typeof Brand_Binding;
1123
+ static readonly _capnp: {
1124
+ displayName: string;
1125
+ id: string;
1126
+ size: ObjectSize;
1127
+ };
1128
+ static _Scopes: ListCtor<Brand_Scope>;
1129
+ _adoptScopes(value: Orphan<List<Brand_Scope>>): void;
1130
+ _disownScopes(): Orphan<List<Brand_Scope>>;
1131
+ /**
1132
+ * For each of the target type and each of its parent scopes, a parameterization may be included
1133
+ * in this list. If no parameterization is included for a particular relevant scope, then either
1134
+ * that scope has no parameters or all parameters should be considered to be `AnyPointer`.
1135
+ *
1136
+ */
1137
+ get scopes(): List<Brand_Scope>;
1138
+ _hasScopes(): boolean;
1139
+ _initScopes(length: number): List<Brand_Scope>;
1140
+ set scopes(value: List<Brand_Scope>);
1141
+ toString(): string;
1142
+ }
1143
+ declare const Value_Which: {
1144
+ readonly VOID: 0;
1145
+ readonly BOOL: 1;
1146
+ readonly INT8: 2;
1147
+ readonly INT16: 3;
1148
+ readonly INT32: 4;
1149
+ readonly INT64: 5;
1150
+ readonly UINT8: 6;
1151
+ readonly UINT16: 7;
1152
+ readonly UINT32: 8;
1153
+ readonly UINT64: 9;
1154
+ readonly FLOAT32: 10;
1155
+ readonly FLOAT64: 11;
1156
+ readonly TEXT: 12;
1157
+ readonly DATA: 13;
1158
+ readonly LIST: 14;
1159
+ readonly ENUM: 15;
1160
+ readonly STRUCT: 16;
1161
+ /**
1162
+ * The only interface value that can be represented statically is "null", whose methods always
1163
+ * throw exceptions.
1164
+ *
1165
+ */
1166
+ readonly INTERFACE: 17;
1167
+ readonly ANY_POINTER: 18;
1168
+ };
1169
+ type Value_Which = (typeof Value_Which)[keyof typeof Value_Which];
1170
+ /**
1171
+ * Represents a value, e.g. a field default value, constant value, or annotation value.
1172
+ *
1173
+ */
1174
+ declare class Value extends Struct {
1175
+ static readonly VOID: 0;
1176
+ static readonly BOOL: 1;
1177
+ static readonly INT8: 2;
1178
+ static readonly INT16: 3;
1179
+ static readonly INT32: 4;
1180
+ static readonly INT64: 5;
1181
+ static readonly UINT8: 6;
1182
+ static readonly UINT16: 7;
1183
+ static readonly UINT32: 8;
1184
+ static readonly UINT64: 9;
1185
+ static readonly FLOAT32: 10;
1186
+ static readonly FLOAT64: 11;
1187
+ static readonly TEXT: 12;
1188
+ static readonly DATA: 13;
1189
+ static readonly LIST: 14;
1190
+ static readonly ENUM: 15;
1191
+ static readonly STRUCT: 16;
1192
+ static readonly INTERFACE: 17;
1193
+ static readonly ANY_POINTER: 18;
1194
+ static readonly _capnp: {
1195
+ displayName: string;
1196
+ id: string;
1197
+ size: ObjectSize;
1198
+ };
1199
+ get _isVoid(): boolean;
1200
+ set void(_: true);
1201
+ get bool(): boolean;
1202
+ get _isBool(): boolean;
1203
+ set bool(value: boolean);
1204
+ get int8(): number;
1205
+ get _isInt8(): boolean;
1206
+ set int8(value: number);
1207
+ get int16(): number;
1208
+ get _isInt16(): boolean;
1209
+ set int16(value: number);
1210
+ get int32(): number;
1211
+ get _isInt32(): boolean;
1212
+ set int32(value: number);
1213
+ get int64(): bigint;
1214
+ get _isInt64(): boolean;
1215
+ set int64(value: bigint);
1216
+ get uint8(): number;
1217
+ get _isUint8(): boolean;
1218
+ set uint8(value: number);
1219
+ get uint16(): number;
1220
+ get _isUint16(): boolean;
1221
+ set uint16(value: number);
1222
+ get uint32(): number;
1223
+ get _isUint32(): boolean;
1224
+ set uint32(value: number);
1225
+ get uint64(): bigint;
1226
+ get _isUint64(): boolean;
1227
+ set uint64(value: bigint);
1228
+ get float32(): number;
1229
+ get _isFloat32(): boolean;
1230
+ set float32(value: number);
1231
+ get float64(): number;
1232
+ get _isFloat64(): boolean;
1233
+ set float64(value: number);
1234
+ get text(): string;
1235
+ get _isText(): boolean;
1236
+ set text(value: string);
1237
+ _adoptData(value: Orphan<Data>): void;
1238
+ _disownData(): Orphan<Data>;
1239
+ get data(): Data;
1240
+ _hasData(): boolean;
1241
+ _initData(length: number): Data;
1242
+ get _isData(): boolean;
1243
+ set data(value: Data);
1244
+ _adoptList(value: Orphan<Pointer>): void;
1245
+ _disownList(): Orphan<Pointer>;
1246
+ get list(): Pointer;
1247
+ _hasList(): boolean;
1248
+ get _isList(): boolean;
1249
+ set list(value: Pointer);
1250
+ get enum(): number;
1251
+ get _isEnum(): boolean;
1252
+ set enum(value: number);
1253
+ _adoptStruct(value: Orphan<Pointer>): void;
1254
+ _disownStruct(): Orphan<Pointer>;
1255
+ get struct(): Pointer;
1256
+ _hasStruct(): boolean;
1257
+ get _isStruct(): boolean;
1258
+ set struct(value: Pointer);
1259
+ get _isInterface(): boolean;
1260
+ set interface(_: true);
1261
+ _adoptAnyPointer(value: Orphan<Pointer>): void;
1262
+ _disownAnyPointer(): Orphan<Pointer>;
1263
+ get anyPointer(): Pointer;
1264
+ _hasAnyPointer(): boolean;
1265
+ get _isAnyPointer(): boolean;
1266
+ set anyPointer(value: Pointer);
1267
+ toString(): string;
1268
+ which(): Value_Which;
1269
+ }
1270
+ /**
1271
+ * Describes an annotation applied to a declaration. Note AnnotationNode describes the
1272
+ * annotation's declaration, while this describes a use of the annotation.
1273
+ *
1274
+ */
1275
+ declare class Annotation extends Struct {
1276
+ static readonly _capnp: {
1277
+ displayName: string;
1278
+ id: string;
1279
+ size: ObjectSize;
1280
+ };
1281
+ /**
1282
+ * ID of the annotation node.
1283
+ *
1284
+ */
1285
+ get id(): bigint;
1286
+ set id(value: bigint);
1287
+ _adoptBrand(value: Orphan<Brand>): void;
1288
+ _disownBrand(): Orphan<Brand>;
1289
+ /**
1290
+ * Brand of the annotation.
1291
+ *
1292
+ * Note that the annotation itself is not allowed to be parameterized, but its scope might be.
1293
+ *
1294
+ */
1295
+ get brand(): Brand;
1296
+ _hasBrand(): boolean;
1297
+ _initBrand(): Brand;
1298
+ set brand(value: Brand);
1299
+ _adoptValue(value: Orphan<Value>): void;
1300
+ _disownValue(): Orphan<Value>;
1301
+ get value(): Value;
1302
+ _hasValue(): boolean;
1303
+ _initValue(): Value;
1304
+ set value(value: Value);
1305
+ toString(): string;
1306
+ }
1307
+ declare const ElementSize: {
1308
+ /**
1309
+ * aka "void", but that's a keyword.
1310
+ *
1311
+ */
1312
+ readonly EMPTY: 0;
1313
+ readonly BIT: 1;
1314
+ readonly BYTE: 2;
1315
+ readonly TWO_BYTES: 3;
1316
+ readonly FOUR_BYTES: 4;
1317
+ readonly EIGHT_BYTES: 5;
1318
+ readonly POINTER: 6;
1319
+ readonly INLINE_COMPOSITE: 7;
1320
+ };
1321
+ type ElementSize = (typeof ElementSize)[keyof typeof ElementSize];
1322
+ declare class CapnpVersion extends Struct {
1323
+ static readonly _capnp: {
1324
+ displayName: string;
1325
+ id: string;
1326
+ size: ObjectSize;
1327
+ };
1328
+ get major(): number;
1329
+ set major(value: number);
1330
+ get minor(): number;
1331
+ set minor(value: number);
1332
+ get micro(): number;
1333
+ set micro(value: number);
1334
+ toString(): string;
1335
+ }
1336
+ declare class CodeGeneratorRequest_RequestedFile_Import extends Struct {
1337
+ static readonly _capnp: {
1338
+ displayName: string;
1339
+ id: string;
1340
+ size: ObjectSize;
1341
+ };
1342
+ /**
1343
+ * ID of the imported file.
1344
+ *
1345
+ */
1346
+ get id(): bigint;
1347
+ set id(value: bigint);
1348
+ /**
1349
+ * Name which *this* file used to refer to the foreign file. This may be a relative name.
1350
+ * This information is provided because it might be useful for code generation, e.g. to
1351
+ * generate #include directives in C++. We don't put this in Node.file because this
1352
+ * information is only meaningful at compile time anyway.
1353
+ *
1354
+ * (On Zooko's triangle, this is the import's petname according to the importing file.)
1355
+ *
1356
+ */
1357
+ get name(): string;
1358
+ set name(value: string);
1359
+ toString(): string;
1360
+ }
1361
+ declare class CodeGeneratorRequest_RequestedFile extends Struct {
1362
+ static readonly Import: typeof CodeGeneratorRequest_RequestedFile_Import;
1363
+ static readonly _capnp: {
1364
+ displayName: string;
1365
+ id: string;
1366
+ size: ObjectSize;
1367
+ };
1368
+ static _Imports: ListCtor<CodeGeneratorRequest_RequestedFile_Import>;
1369
+ /**
1370
+ * ID of the file.
1371
+ *
1372
+ */
1373
+ get id(): bigint;
1374
+ set id(value: bigint);
1375
+ /**
1376
+ * Name of the file as it appeared on the command-line (minus the src-prefix). You may use
1377
+ * this to decide where to write the output.
1378
+ *
1379
+ */
1380
+ get filename(): string;
1381
+ set filename(value: string);
1382
+ _adoptImports(value: Orphan<List<CodeGeneratorRequest_RequestedFile_Import>>): void;
1383
+ _disownImports(): Orphan<List<CodeGeneratorRequest_RequestedFile_Import>>;
1384
+ /**
1385
+ * List of all imported paths seen in this file.
1386
+ *
1387
+ */
1388
+ get imports(): List<CodeGeneratorRequest_RequestedFile_Import>;
1389
+ _hasImports(): boolean;
1390
+ _initImports(length: number): List<CodeGeneratorRequest_RequestedFile_Import>;
1391
+ set imports(value: List<CodeGeneratorRequest_RequestedFile_Import>);
1392
+ toString(): string;
1393
+ }
1394
+ declare class CodeGeneratorRequest extends Struct {
1395
+ static readonly RequestedFile: typeof CodeGeneratorRequest_RequestedFile;
1396
+ static readonly _capnp: {
1397
+ displayName: string;
1398
+ id: string;
1399
+ size: ObjectSize;
1400
+ };
1401
+ static _Nodes: ListCtor<Node>;
1402
+ static _SourceInfo: ListCtor<Node_SourceInfo>;
1403
+ static _RequestedFiles: ListCtor<CodeGeneratorRequest_RequestedFile>;
1404
+ _adoptCapnpVersion(value: Orphan<CapnpVersion>): void;
1405
+ _disownCapnpVersion(): Orphan<CapnpVersion>;
1406
+ /**
1407
+ * Version of the `capnp` executable. Generally, code generators should ignore this, but the code
1408
+ * generators that ship with `capnp` itself will print a warning if this mismatches since that
1409
+ * probably indicates something is misconfigured.
1410
+ *
1411
+ * The first version of 'capnp' to set this was 0.6.0. So, if it's missing, the compiler version
1412
+ * is older than that.
1413
+ *
1414
+ */
1415
+ get capnpVersion(): CapnpVersion;
1416
+ _hasCapnpVersion(): boolean;
1417
+ _initCapnpVersion(): CapnpVersion;
1418
+ set capnpVersion(value: CapnpVersion);
1419
+ _adoptNodes(value: Orphan<List<Node>>): void;
1420
+ _disownNodes(): Orphan<List<Node>>;
1421
+ /**
1422
+ * All nodes parsed by the compiler, including for the files on the command line and their
1423
+ * imports.
1424
+ *
1425
+ */
1426
+ get nodes(): List<Node>;
1427
+ _hasNodes(): boolean;
1428
+ _initNodes(length: number): List<Node>;
1429
+ set nodes(value: List<Node>);
1430
+ _adoptSourceInfo(value: Orphan<List<Node_SourceInfo>>): void;
1431
+ _disownSourceInfo(): Orphan<List<Node_SourceInfo>>;
1432
+ /**
1433
+ * Information about the original source code for each node, where available. This array may be
1434
+ * omitted or may be missing some nodes if no info is available for them.
1435
+ *
1436
+ */
1437
+ get sourceInfo(): List<Node_SourceInfo>;
1438
+ _hasSourceInfo(): boolean;
1439
+ _initSourceInfo(length: number): List<Node_SourceInfo>;
1440
+ set sourceInfo(value: List<Node_SourceInfo>);
1441
+ _adoptRequestedFiles(value: Orphan<List<CodeGeneratorRequest_RequestedFile>>): void;
1442
+ _disownRequestedFiles(): Orphan<List<CodeGeneratorRequest_RequestedFile>>;
1443
+ /**
1444
+ * Files which were listed on the command line.
1445
+ *
1446
+ */
1447
+ get requestedFiles(): List<CodeGeneratorRequest_RequestedFile>;
1448
+ _hasRequestedFiles(): boolean;
1449
+ _initRequestedFiles(length: number): List<CodeGeneratorRequest_RequestedFile>;
1450
+ set requestedFiles(value: List<CodeGeneratorRequest_RequestedFile>);
1451
+ toString(): string;
1452
+ }
1453
+
1454
+ export { Annotation, Brand, Brand_Binding, Brand_Binding_Which, Brand_Scope, Brand_Scope_Which, CapnpVersion, CodeGeneratorRequest, CodeGeneratorRequest_RequestedFile, CodeGeneratorRequest_RequestedFile_Import, ElementSize, Enumerant, Field, Field_Group, Field_Ordinal, Field_Ordinal_Which, Field_Slot, Field_Which, Method, Node, Node_Annotation, Node_Const, Node_Enum, Node_Interface, Node_NestedNode, Node_Parameter, Node_SourceInfo, Node_SourceInfo_Member, Node_Struct, Node_Which, Superclass, Type, Type_AnyPointer, Type_AnyPointer_ImplicitMethodParameter, Type_AnyPointer_Parameter, Type_AnyPointer_Unconstrained, Type_AnyPointer_Unconstrained_Which, Type_AnyPointer_Which, Type_Enum, Type_Interface, Type_List, Type_Struct, Type_Which, Value, Value_Which, _capnpFileId };