70bf21e064
Handle Changesets / Handle Changesets (push) Waiting to run
Semgrep OSS scan / semgrep-oss (push) Waiting to run
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
1765 lines
40 KiB
JavaScript
1765 lines
40 KiB
JavaScript
// This file has been automatically generated by capnp-es.
|
|
import * as $ from "capnp-es";
|
|
export const _capnpFileId = 0xb042d6da9e1721adn;
|
|
export const Type_Which = {
|
|
/**
|
|
* statically unknown type
|
|
*
|
|
*/
|
|
UNKNOWN: 0,
|
|
/**
|
|
* void type
|
|
*
|
|
*/
|
|
VOIDT: 1,
|
|
/**
|
|
* boolean type
|
|
*
|
|
*/
|
|
BOOLT: 2,
|
|
/**
|
|
* number type
|
|
*
|
|
*/
|
|
NUMBER: 3,
|
|
/**
|
|
* jsg, kj Promise
|
|
*
|
|
*/
|
|
PROMISE: 4,
|
|
/**
|
|
* jsg resource or struct
|
|
*
|
|
*/
|
|
STRUCTURE: 5,
|
|
/**
|
|
* any string-like type
|
|
*
|
|
*/
|
|
STRING: 6,
|
|
/**
|
|
* generic object type
|
|
*
|
|
*/
|
|
OBJECT: 7,
|
|
/**
|
|
* Array or ArrayPtr
|
|
*
|
|
*/
|
|
ARRAY: 8,
|
|
/**
|
|
* kj::Maybe or jsg::Optional
|
|
*
|
|
*/
|
|
MAYBE: 9,
|
|
/**
|
|
* jsg::Dict
|
|
*
|
|
*/
|
|
DICT: 10,
|
|
/**
|
|
* kj::OneOf
|
|
*
|
|
*/
|
|
ONE_OF: 11,
|
|
/**
|
|
* one of the builtin types
|
|
*
|
|
*/
|
|
BUILTIN: 12,
|
|
/**
|
|
* one of v8 intrinsics
|
|
*
|
|
*/
|
|
INTRINSIC: 13,
|
|
/**
|
|
* jsg::Function
|
|
*
|
|
*/
|
|
FUNCTION: 14,
|
|
/**
|
|
* jsg implementation type
|
|
*
|
|
*/
|
|
JSG_IMPL: 15,
|
|
JS_BUILTIN: 16
|
|
};
|
|
/**
|
|
* A description of the C++ type.
|
|
* It is as precise as needed for applications, and is mostly how the type looks from the js side.
|
|
*
|
|
*/
|
|
export class Type extends $.Struct {
|
|
static UNKNOWN = Type_Which.UNKNOWN;
|
|
static VOIDT = Type_Which.VOIDT;
|
|
static BOOLT = Type_Which.BOOLT;
|
|
static NUMBER = Type_Which.NUMBER;
|
|
static PROMISE = Type_Which.PROMISE;
|
|
static STRUCTURE = Type_Which.STRUCTURE;
|
|
static STRING = Type_Which.STRING;
|
|
static OBJECT = Type_Which.OBJECT;
|
|
static ARRAY = Type_Which.ARRAY;
|
|
static MAYBE = Type_Which.MAYBE;
|
|
static DICT = Type_Which.DICT;
|
|
static ONE_OF = Type_Which.ONE_OF;
|
|
static BUILTIN = Type_Which.BUILTIN;
|
|
static INTRINSIC = Type_Which.INTRINSIC;
|
|
static FUNCTION = Type_Which.FUNCTION;
|
|
static JSG_IMPL = Type_Which.JSG_IMPL;
|
|
static JS_BUILTIN = Type_Which.JS_BUILTIN;
|
|
static _capnp = {
|
|
displayName: "Type",
|
|
id: "d2347ab301451a8c",
|
|
size: new $.ObjectSize(8, 1),
|
|
};
|
|
get _isUnknown() {
|
|
return $.utils.getUint16(0, this) === 0;
|
|
}
|
|
set unknown(_) {
|
|
$.utils.setUint16(0, 0, this);
|
|
}
|
|
get _isVoidt() {
|
|
return $.utils.getUint16(0, this) === 1;
|
|
}
|
|
set voidt(_) {
|
|
$.utils.setUint16(0, 1, this);
|
|
}
|
|
get _isBoolt() {
|
|
return $.utils.getUint16(0, this) === 2;
|
|
}
|
|
set boolt(_) {
|
|
$.utils.setUint16(0, 2, this);
|
|
}
|
|
_adoptNumber(value) {
|
|
$.utils.setUint16(0, 3, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownNumber() {
|
|
return $.utils.disown(this.number);
|
|
}
|
|
/**
|
|
* number type
|
|
*
|
|
*/
|
|
get number() {
|
|
$.utils.testWhich("number", $.utils.getUint16(0, this), 3, this);
|
|
return $.utils.getStruct(0, NumberType, this);
|
|
}
|
|
_hasNumber() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initNumber() {
|
|
$.utils.setUint16(0, 3, this);
|
|
return $.utils.initStructAt(0, NumberType, this);
|
|
}
|
|
get _isNumber() {
|
|
return $.utils.getUint16(0, this) === 3;
|
|
}
|
|
set number(value) {
|
|
$.utils.setUint16(0, 3, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptPromise(value) {
|
|
$.utils.setUint16(0, 4, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownPromise() {
|
|
return $.utils.disown(this.promise);
|
|
}
|
|
/**
|
|
* jsg, kj Promise
|
|
*
|
|
*/
|
|
get promise() {
|
|
$.utils.testWhich("promise", $.utils.getUint16(0, this), 4, this);
|
|
return $.utils.getStruct(0, PromiseType, this);
|
|
}
|
|
_hasPromise() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initPromise() {
|
|
$.utils.setUint16(0, 4, this);
|
|
return $.utils.initStructAt(0, PromiseType, this);
|
|
}
|
|
get _isPromise() {
|
|
return $.utils.getUint16(0, this) === 4;
|
|
}
|
|
set promise(value) {
|
|
$.utils.setUint16(0, 4, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptStructure(value) {
|
|
$.utils.setUint16(0, 5, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownStructure() {
|
|
return $.utils.disown(this.structure);
|
|
}
|
|
/**
|
|
* jsg resource or struct
|
|
*
|
|
*/
|
|
get structure() {
|
|
$.utils.testWhich("structure", $.utils.getUint16(0, this), 5, this);
|
|
return $.utils.getStruct(0, StructureType, this);
|
|
}
|
|
_hasStructure() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initStructure() {
|
|
$.utils.setUint16(0, 5, this);
|
|
return $.utils.initStructAt(0, StructureType, this);
|
|
}
|
|
get _isStructure() {
|
|
return $.utils.getUint16(0, this) === 5;
|
|
}
|
|
set structure(value) {
|
|
$.utils.setUint16(0, 5, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptString(value) {
|
|
$.utils.setUint16(0, 6, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownString() {
|
|
return $.utils.disown(this.string);
|
|
}
|
|
/**
|
|
* any string-like type
|
|
*
|
|
*/
|
|
get string() {
|
|
$.utils.testWhich("string", $.utils.getUint16(0, this), 6, this);
|
|
return $.utils.getStruct(0, StringType, this);
|
|
}
|
|
_hasString() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initString() {
|
|
$.utils.setUint16(0, 6, this);
|
|
return $.utils.initStructAt(0, StringType, this);
|
|
}
|
|
get _isString() {
|
|
return $.utils.getUint16(0, this) === 6;
|
|
}
|
|
set string(value) {
|
|
$.utils.setUint16(0, 6, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
get _isObject() {
|
|
return $.utils.getUint16(0, this) === 7;
|
|
}
|
|
set object(_) {
|
|
$.utils.setUint16(0, 7, this);
|
|
}
|
|
_adoptArray(value) {
|
|
$.utils.setUint16(0, 8, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownArray() {
|
|
return $.utils.disown(this.array);
|
|
}
|
|
/**
|
|
* Array or ArrayPtr
|
|
*
|
|
*/
|
|
get array() {
|
|
$.utils.testWhich("array", $.utils.getUint16(0, this), 8, this);
|
|
return $.utils.getStruct(0, ArrayType, this);
|
|
}
|
|
_hasArray() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initArray() {
|
|
$.utils.setUint16(0, 8, this);
|
|
return $.utils.initStructAt(0, ArrayType, this);
|
|
}
|
|
get _isArray() {
|
|
return $.utils.getUint16(0, this) === 8;
|
|
}
|
|
set array(value) {
|
|
$.utils.setUint16(0, 8, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptMaybe(value) {
|
|
$.utils.setUint16(0, 9, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownMaybe() {
|
|
return $.utils.disown(this.maybe);
|
|
}
|
|
/**
|
|
* kj::Maybe or jsg::Optional
|
|
*
|
|
*/
|
|
get maybe() {
|
|
$.utils.testWhich("maybe", $.utils.getUint16(0, this), 9, this);
|
|
return $.utils.getStruct(0, MaybeType, this);
|
|
}
|
|
_hasMaybe() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initMaybe() {
|
|
$.utils.setUint16(0, 9, this);
|
|
return $.utils.initStructAt(0, MaybeType, this);
|
|
}
|
|
get _isMaybe() {
|
|
return $.utils.getUint16(0, this) === 9;
|
|
}
|
|
set maybe(value) {
|
|
$.utils.setUint16(0, 9, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptDict(value) {
|
|
$.utils.setUint16(0, 10, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownDict() {
|
|
return $.utils.disown(this.dict);
|
|
}
|
|
/**
|
|
* jsg::Dict
|
|
*
|
|
*/
|
|
get dict() {
|
|
$.utils.testWhich("dict", $.utils.getUint16(0, this), 10, this);
|
|
return $.utils.getStruct(0, DictType, this);
|
|
}
|
|
_hasDict() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initDict() {
|
|
$.utils.setUint16(0, 10, this);
|
|
return $.utils.initStructAt(0, DictType, this);
|
|
}
|
|
get _isDict() {
|
|
return $.utils.getUint16(0, this) === 10;
|
|
}
|
|
set dict(value) {
|
|
$.utils.setUint16(0, 10, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptOneOf(value) {
|
|
$.utils.setUint16(0, 11, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownOneOf() {
|
|
return $.utils.disown(this.oneOf);
|
|
}
|
|
/**
|
|
* kj::OneOf
|
|
*
|
|
*/
|
|
get oneOf() {
|
|
$.utils.testWhich("oneOf", $.utils.getUint16(0, this), 11, this);
|
|
return $.utils.getStruct(0, OneOfType, this);
|
|
}
|
|
_hasOneOf() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initOneOf() {
|
|
$.utils.setUint16(0, 11, this);
|
|
return $.utils.initStructAt(0, OneOfType, this);
|
|
}
|
|
get _isOneOf() {
|
|
return $.utils.getUint16(0, this) === 11;
|
|
}
|
|
set oneOf(value) {
|
|
$.utils.setUint16(0, 11, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptBuiltin(value) {
|
|
$.utils.setUint16(0, 12, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownBuiltin() {
|
|
return $.utils.disown(this.builtin);
|
|
}
|
|
/**
|
|
* one of the builtin types
|
|
*
|
|
*/
|
|
get builtin() {
|
|
$.utils.testWhich("builtin", $.utils.getUint16(0, this), 12, this);
|
|
return $.utils.getStruct(0, BuiltinType, this);
|
|
}
|
|
_hasBuiltin() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initBuiltin() {
|
|
$.utils.setUint16(0, 12, this);
|
|
return $.utils.initStructAt(0, BuiltinType, this);
|
|
}
|
|
get _isBuiltin() {
|
|
return $.utils.getUint16(0, this) === 12;
|
|
}
|
|
set builtin(value) {
|
|
$.utils.setUint16(0, 12, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptIntrinsic(value) {
|
|
$.utils.setUint16(0, 13, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownIntrinsic() {
|
|
return $.utils.disown(this.intrinsic);
|
|
}
|
|
/**
|
|
* one of v8 intrinsics
|
|
*
|
|
*/
|
|
get intrinsic() {
|
|
$.utils.testWhich("intrinsic", $.utils.getUint16(0, this), 13, this);
|
|
return $.utils.getStruct(0, IntrinsicType, this);
|
|
}
|
|
_hasIntrinsic() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initIntrinsic() {
|
|
$.utils.setUint16(0, 13, this);
|
|
return $.utils.initStructAt(0, IntrinsicType, this);
|
|
}
|
|
get _isIntrinsic() {
|
|
return $.utils.getUint16(0, this) === 13;
|
|
}
|
|
set intrinsic(value) {
|
|
$.utils.setUint16(0, 13, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptFunction(value) {
|
|
$.utils.setUint16(0, 14, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownFunction() {
|
|
return $.utils.disown(this.function);
|
|
}
|
|
/**
|
|
* jsg::Function
|
|
*
|
|
*/
|
|
get function() {
|
|
$.utils.testWhich("function", $.utils.getUint16(0, this), 14, this);
|
|
return $.utils.getStruct(0, FunctionType, this);
|
|
}
|
|
_hasFunction() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initFunction() {
|
|
$.utils.setUint16(0, 14, this);
|
|
return $.utils.initStructAt(0, FunctionType, this);
|
|
}
|
|
get _isFunction() {
|
|
return $.utils.getUint16(0, this) === 14;
|
|
}
|
|
set function(value) {
|
|
$.utils.setUint16(0, 14, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptJsgImpl(value) {
|
|
$.utils.setUint16(0, 15, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownJsgImpl() {
|
|
return $.utils.disown(this.jsgImpl);
|
|
}
|
|
/**
|
|
* jsg implementation type
|
|
*
|
|
*/
|
|
get jsgImpl() {
|
|
$.utils.testWhich("jsgImpl", $.utils.getUint16(0, this), 15, this);
|
|
return $.utils.getStruct(0, JsgImplType, this);
|
|
}
|
|
_hasJsgImpl() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initJsgImpl() {
|
|
$.utils.setUint16(0, 15, this);
|
|
return $.utils.initStructAt(0, JsgImplType, this);
|
|
}
|
|
get _isJsgImpl() {
|
|
return $.utils.getUint16(0, this) === 15;
|
|
}
|
|
set jsgImpl(value) {
|
|
$.utils.setUint16(0, 15, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptJsBuiltin(value) {
|
|
$.utils.setUint16(0, 16, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownJsBuiltin() {
|
|
return $.utils.disown(this.jsBuiltin);
|
|
}
|
|
get jsBuiltin() {
|
|
$.utils.testWhich("jsBuiltin", $.utils.getUint16(0, this), 16, this);
|
|
return $.utils.getStruct(0, JsBuiltinType, this);
|
|
}
|
|
_hasJsBuiltin() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initJsBuiltin() {
|
|
$.utils.setUint16(0, 16, this);
|
|
return $.utils.initStructAt(0, JsBuiltinType, this);
|
|
}
|
|
get _isJsBuiltin() {
|
|
return $.utils.getUint16(0, this) === 16;
|
|
}
|
|
set jsBuiltin(value) {
|
|
$.utils.setUint16(0, 16, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString() { return "Type_" + super.toString(); }
|
|
which() {
|
|
return $.utils.getUint16(0, this);
|
|
}
|
|
}
|
|
/**
|
|
* Any c++ number type
|
|
*
|
|
*/
|
|
export class NumberType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "NumberType",
|
|
id: "afd4316863bdd80a",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
toString() { return "NumberType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* kj or jsg Promise<T>
|
|
*
|
|
*/
|
|
export class PromiseType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "PromiseType",
|
|
id: "977eaa74d24bb2dc",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
_adoptValue(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownValue() {
|
|
return $.utils.disown(this.value);
|
|
}
|
|
get value() {
|
|
return $.utils.getStruct(0, Type, this);
|
|
}
|
|
_hasValue() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initValue() {
|
|
return $.utils.initStructAt(0, Type, this);
|
|
}
|
|
set value(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString() { return "PromiseType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* Structure types need to be resolved separately to prevent circular references with types
|
|
*
|
|
*/
|
|
export class StructureType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "StructureType",
|
|
id: "9001b3522132305a",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
get fullyQualifiedName() {
|
|
return $.utils.getText(1, this);
|
|
}
|
|
set fullyQualifiedName(value) {
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "StructureType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* any string or string-like type
|
|
*
|
|
*/
|
|
export class StringType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "StringType",
|
|
id: "913621db0713d640",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
toString() { return "StringType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* v8::Intrinsic
|
|
*
|
|
*/
|
|
export class IntrinsicType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "IntrinsicType",
|
|
id: "87c24648e89ccc02",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
toString() { return "IntrinsicType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* Array like structure
|
|
*
|
|
*/
|
|
export class ArrayType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "ArrayType",
|
|
id: "f6d86da0d225932b",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
_adoptElement(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownElement() {
|
|
return $.utils.disown(this.element);
|
|
}
|
|
get element() {
|
|
return $.utils.getStruct(0, Type, this);
|
|
}
|
|
_hasElement() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initElement() {
|
|
return $.utils.initStructAt(0, Type, this);
|
|
}
|
|
set element(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
get name() {
|
|
return $.utils.getText(1, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "ArrayType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* kj::Maybe, jsg::Optional, jsg::LenientOptional
|
|
*
|
|
*/
|
|
export class MaybeType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "MaybeType",
|
|
id: "9d64649bff8a5cee",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
_adoptValue(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownValue() {
|
|
return $.utils.disown(this.value);
|
|
}
|
|
get value() {
|
|
return $.utils.getStruct(0, Type, this);
|
|
}
|
|
_hasValue() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initValue() {
|
|
return $.utils.initStructAt(0, Type, this);
|
|
}
|
|
set value(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
get name() {
|
|
return $.utils.getText(1, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "MaybeType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* jsg::dict
|
|
*
|
|
*/
|
|
export class DictType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "DictType",
|
|
id: "b7d8e1ee6205d554",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
_adoptKey(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownKey() {
|
|
return $.utils.disown(this.key);
|
|
}
|
|
get key() {
|
|
return $.utils.getStruct(0, Type, this);
|
|
}
|
|
_hasKey() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initKey() {
|
|
return $.utils.initStructAt(0, Type, this);
|
|
}
|
|
set key(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptValue(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownValue() {
|
|
return $.utils.disown(this.value);
|
|
}
|
|
get value() {
|
|
return $.utils.getStruct(1, Type, this);
|
|
}
|
|
_hasValue() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initValue() {
|
|
return $.utils.initStructAt(1, Type, this);
|
|
}
|
|
set value(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
toString() { return "DictType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* kj::OneOf
|
|
*
|
|
*/
|
|
export class OneOfType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "OneOfType",
|
|
id: "95216521d1f195ae",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
static _Variants;
|
|
_adoptVariants(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownVariants() {
|
|
return $.utils.disown(this.variants);
|
|
}
|
|
get variants() {
|
|
return $.utils.getList(0, OneOfType._Variants, this);
|
|
}
|
|
_hasVariants() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initVariants(length) {
|
|
return $.utils.initList(0, OneOfType._Variants, length, this);
|
|
}
|
|
set variants(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString() { return "OneOfType_" + super.toString(); }
|
|
}
|
|
export const BuiltinType_Type = {
|
|
/**
|
|
* v8::UInt8Array
|
|
*
|
|
*/
|
|
V8UINT8ARRAY: 0,
|
|
/**
|
|
* v8::ArrayBufferView
|
|
*
|
|
*/
|
|
V8ARRAY_BUFFER_VIEW: 1,
|
|
/**
|
|
* BufferSource
|
|
*
|
|
*/
|
|
JSG_BUFFER_SOURCE: 2,
|
|
/**
|
|
* kj::Date
|
|
*
|
|
*/
|
|
KJ_DATE: 3,
|
|
/**
|
|
* v8::Function
|
|
*
|
|
*/
|
|
V8FUNCTION: 4,
|
|
/**
|
|
* v8::ArrayBuffer
|
|
*
|
|
*/
|
|
V8ARRAY_BUFFER: 5
|
|
};
|
|
/**
|
|
* One of the types provided by the JS or Runtime platform.
|
|
*
|
|
*/
|
|
export class BuiltinType extends $.Struct {
|
|
static Type = BuiltinType_Type;
|
|
static _capnp = {
|
|
displayName: "BuiltinType",
|
|
id: "96dfb79b276b3379",
|
|
size: new $.ObjectSize(8, 0),
|
|
};
|
|
get type() {
|
|
return $.utils.getUint16(0, this);
|
|
}
|
|
set type(value) {
|
|
$.utils.setUint16(0, value, this);
|
|
}
|
|
toString() { return "BuiltinType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* jsg::Function type
|
|
*
|
|
*/
|
|
export class FunctionType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "FunctionType",
|
|
id: "d7c3505ac05e5fad",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
static _Args;
|
|
_adoptReturnType(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownReturnType() {
|
|
return $.utils.disown(this.returnType);
|
|
}
|
|
get returnType() {
|
|
return $.utils.getStruct(0, Type, this);
|
|
}
|
|
_hasReturnType() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initReturnType() {
|
|
return $.utils.initStructAt(0, Type, this);
|
|
}
|
|
set returnType(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptArgs(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownArgs() {
|
|
return $.utils.disown(this.args);
|
|
}
|
|
get args() {
|
|
return $.utils.getList(1, FunctionType._Args, this);
|
|
}
|
|
_hasArgs() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initArgs(length) {
|
|
return $.utils.initList(1, FunctionType._Args, length, this);
|
|
}
|
|
set args(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
toString() { return "FunctionType_" + super.toString(); }
|
|
}
|
|
export const JsgImplType_Type = {
|
|
/**
|
|
* api meta configuration object
|
|
*
|
|
*/
|
|
CONFIGURATION: 0,
|
|
V8ISOLATE: 1,
|
|
JSG_LOCK: 2,
|
|
JSG_TYPE_HANDLER: 3,
|
|
JSG_UNIMPLEMENTED: 4,
|
|
JSG_VARARGS: 5,
|
|
JSG_SELF_REF: 6,
|
|
V8FUNCTION_CALLBACK_INFO: 7,
|
|
V8PROPERTY_CALLBACK_INFO: 8,
|
|
JSG_NAME: 9
|
|
};
|
|
/**
|
|
* one of the internal jsg types that are not exposed directly but handled specially
|
|
*
|
|
*/
|
|
export class JsgImplType extends $.Struct {
|
|
static Type = JsgImplType_Type;
|
|
static _capnp = {
|
|
displayName: "JsgImplType",
|
|
id: "e0dfbe1216e6985e",
|
|
size: new $.ObjectSize(8, 0),
|
|
};
|
|
get type() {
|
|
return $.utils.getUint16(0, this);
|
|
}
|
|
set type(value) {
|
|
$.utils.setUint16(0, value, this);
|
|
}
|
|
toString() { return "JsgImplType_" + super.toString(); }
|
|
}
|
|
/**
|
|
* A description of either JSG_RESOURCE or JSG_STRUCT
|
|
*
|
|
*/
|
|
export class Structure extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "Structure",
|
|
id: "c9aee5d3d27484f2",
|
|
size: new $.ObjectSize(8, 12),
|
|
};
|
|
static _Members;
|
|
static _BuiltinModules;
|
|
/**
|
|
* Structure name
|
|
*
|
|
*/
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
/**
|
|
* Fully-qualified structure name including namespaces and parents
|
|
*
|
|
*/
|
|
get fullyQualifiedName() {
|
|
return $.utils.getText(3, this);
|
|
}
|
|
set fullyQualifiedName(value) {
|
|
$.utils.setText(3, value, this);
|
|
}
|
|
_adoptMembers(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownMembers() {
|
|
return $.utils.disown(this.members);
|
|
}
|
|
/**
|
|
* All members in declaration order
|
|
*
|
|
*/
|
|
get members() {
|
|
return $.utils.getList(1, Structure._Members, this);
|
|
}
|
|
_hasMembers() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initMembers(length) {
|
|
return $.utils.initList(1, Structure._Members, length, this);
|
|
}
|
|
set members(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
_adoptExtends(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(2, this));
|
|
}
|
|
_disownExtends() {
|
|
return $.utils.disown(this.extends);
|
|
}
|
|
/**
|
|
* base type
|
|
*
|
|
*/
|
|
get extends() {
|
|
return $.utils.getStruct(2, Type, this);
|
|
}
|
|
_hasExtends() {
|
|
return !$.utils.isNull($.utils.getPointer(2, this));
|
|
}
|
|
_initExtends() {
|
|
return $.utils.initStructAt(2, Type, this);
|
|
}
|
|
set extends(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(2, this));
|
|
}
|
|
/**
|
|
* true if the structure is iterable
|
|
*
|
|
*/
|
|
get iterable() {
|
|
return $.utils.getBit(0, this);
|
|
}
|
|
set iterable(value) {
|
|
$.utils.setBit(0, value, this);
|
|
}
|
|
_adoptIterator(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(4, this));
|
|
}
|
|
_disownIterator() {
|
|
return $.utils.disown(this.iterator);
|
|
}
|
|
/**
|
|
* Method returning iterator if the structure is iterable
|
|
*
|
|
*/
|
|
get iterator() {
|
|
return $.utils.getStruct(4, Method, this);
|
|
}
|
|
_hasIterator() {
|
|
return !$.utils.isNull($.utils.getPointer(4, this));
|
|
}
|
|
_initIterator() {
|
|
return $.utils.initStructAt(4, Method, this);
|
|
}
|
|
set iterator(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(4, this));
|
|
}
|
|
/**
|
|
* true if the structure is async iterable
|
|
*
|
|
*/
|
|
get asyncIterable() {
|
|
return $.utils.getBit(1, this);
|
|
}
|
|
set asyncIterable(value) {
|
|
$.utils.setBit(1, value, this);
|
|
}
|
|
_adoptAsyncIterator(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(5, this));
|
|
}
|
|
_disownAsyncIterator() {
|
|
return $.utils.disown(this.asyncIterator);
|
|
}
|
|
/**
|
|
* Method returning async iterator if the structure is async iterable
|
|
*
|
|
*/
|
|
get asyncIterator() {
|
|
return $.utils.getStruct(5, Method, this);
|
|
}
|
|
_hasAsyncIterator() {
|
|
return !$.utils.isNull($.utils.getPointer(5, this));
|
|
}
|
|
_initAsyncIterator() {
|
|
return $.utils.initStructAt(5, Method, this);
|
|
}
|
|
set asyncIterator(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(5, this));
|
|
}
|
|
/**
|
|
* true if the structure is disposable
|
|
*
|
|
*/
|
|
get disposable() {
|
|
return $.utils.getBit(3, this);
|
|
}
|
|
set disposable(value) {
|
|
$.utils.setBit(3, value, this);
|
|
}
|
|
_adoptDispose(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(10, this));
|
|
}
|
|
_disownDispose() {
|
|
return $.utils.disown(this.dispose);
|
|
}
|
|
/**
|
|
* dispose method
|
|
*
|
|
*/
|
|
get dispose() {
|
|
return $.utils.getStruct(10, Method, this);
|
|
}
|
|
_hasDispose() {
|
|
return !$.utils.isNull($.utils.getPointer(10, this));
|
|
}
|
|
_initDispose() {
|
|
return $.utils.initStructAt(10, Method, this);
|
|
}
|
|
set dispose(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(10, this));
|
|
}
|
|
/**
|
|
* true if the structure is async disposable
|
|
*
|
|
*/
|
|
get asyncDisposable() {
|
|
return $.utils.getBit(4, this);
|
|
}
|
|
set asyncDisposable(value) {
|
|
$.utils.setBit(4, value, this);
|
|
}
|
|
_adoptAsyncDispose(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(11, this));
|
|
}
|
|
_disownAsyncDispose() {
|
|
return $.utils.disown(this.asyncDispose);
|
|
}
|
|
/**
|
|
* asyncDispose method
|
|
*
|
|
*/
|
|
get asyncDispose() {
|
|
return $.utils.getStruct(11, Method, this);
|
|
}
|
|
_hasAsyncDispose() {
|
|
return !$.utils.isNull($.utils.getPointer(11, this));
|
|
}
|
|
_initAsyncDispose() {
|
|
return $.utils.initStructAt(11, Method, this);
|
|
}
|
|
set asyncDispose(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(11, this));
|
|
}
|
|
/**
|
|
* See `JSG_TS_ROOT`'s documentation in the `## TypeScript` section of the JSG README.md.
|
|
* If `JSG_(STRUCT_)TS_ROOT` is declared for a type, this value will be `true`.
|
|
*
|
|
*/
|
|
get tsRoot() {
|
|
return $.utils.getBit(2, this);
|
|
}
|
|
set tsRoot(value) {
|
|
$.utils.setBit(2, value, this);
|
|
}
|
|
/**
|
|
* See `JSG_TS_OVERRIDE`'s documentation in the `## TypeScript` section of the JSG README.md.
|
|
* If `JSG_(STRUCT_)TS_OVERRIDE` is declared for a type, this value will be the contents of the
|
|
* macro declaration verbatim.
|
|
*
|
|
*/
|
|
get tsOverride() {
|
|
return $.utils.getText(6, this);
|
|
}
|
|
set tsOverride(value) {
|
|
$.utils.setText(6, value, this);
|
|
}
|
|
/**
|
|
* See `JSG_TS_DEFINE`'s documentation in the `## TypeScript` section of the JSG README.md.
|
|
* If `JSG_(STRUCT_)TS_DEFINE` is declared for a type, this value will be the contents of the
|
|
* macro declaration verbatim.
|
|
*
|
|
*/
|
|
get tsDefine() {
|
|
return $.utils.getText(7, this);
|
|
}
|
|
set tsDefine(value) {
|
|
$.utils.setText(7, value, this);
|
|
}
|
|
_adoptCallable(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(8, this));
|
|
}
|
|
_disownCallable() {
|
|
return $.utils.disown(this.callable);
|
|
}
|
|
/**
|
|
* If this type is callable as a function, the signature of said function. Otherwise, null.
|
|
*
|
|
*/
|
|
get callable() {
|
|
return $.utils.getStruct(8, FunctionType, this);
|
|
}
|
|
_hasCallable() {
|
|
return !$.utils.isNull($.utils.getPointer(8, this));
|
|
}
|
|
_initCallable() {
|
|
return $.utils.initStructAt(8, FunctionType, this);
|
|
}
|
|
set callable(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(8, this));
|
|
}
|
|
_adoptBuiltinModules(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(9, this));
|
|
}
|
|
_disownBuiltinModules() {
|
|
return $.utils.disown(this.builtinModules);
|
|
}
|
|
/**
|
|
* List of all builtin modules provided by the context.
|
|
*
|
|
*/
|
|
get builtinModules() {
|
|
return $.utils.getList(9, Structure._BuiltinModules, this);
|
|
}
|
|
_hasBuiltinModules() {
|
|
return !$.utils.isNull($.utils.getPointer(9, this));
|
|
}
|
|
_initBuiltinModules(length) {
|
|
return $.utils.initList(9, Structure._BuiltinModules, length, this);
|
|
}
|
|
set builtinModules(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(9, this));
|
|
}
|
|
toString() { return "Structure_" + super.toString(); }
|
|
}
|
|
/**
|
|
* nested type
|
|
*
|
|
*/
|
|
export class Member_Nested extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "nested",
|
|
id: "cc1920702876b1f6",
|
|
size: new $.ObjectSize(8, 2),
|
|
};
|
|
_adoptStructure(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownStructure() {
|
|
return $.utils.disown(this.structure);
|
|
}
|
|
get structure() {
|
|
return $.utils.getStruct(0, Structure, this);
|
|
}
|
|
_hasStructure() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initStructure() {
|
|
return $.utils.initStructAt(0, Structure, this);
|
|
}
|
|
set structure(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
/**
|
|
* For JSG_NESTED_TYPE_NAMED, if name is different to structure
|
|
*
|
|
*/
|
|
get name() {
|
|
return $.utils.getText(1, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "Member_Nested_" + super.toString(); }
|
|
}
|
|
export const Member_Which = {
|
|
/**
|
|
* any kind of method
|
|
*
|
|
*/
|
|
METHOD: 0,
|
|
/**
|
|
* any kind of property
|
|
*
|
|
*/
|
|
PROPERTY: 1,
|
|
/**
|
|
* nested type
|
|
*
|
|
*/
|
|
NESTED: 2,
|
|
/**
|
|
* static constant
|
|
*
|
|
*/
|
|
CONSTANT: 3,
|
|
/**
|
|
* structure constructor
|
|
*
|
|
*/
|
|
CONSTRUCTOR: 4
|
|
};
|
|
/**
|
|
* One of structure members
|
|
*
|
|
*/
|
|
export class Member extends $.Struct {
|
|
static METHOD = Member_Which.METHOD;
|
|
static PROPERTY = Member_Which.PROPERTY;
|
|
static NESTED = Member_Which.NESTED;
|
|
static CONSTANT = Member_Which.CONSTANT;
|
|
static CONSTRUCTOR = Member_Which.CONSTRUCTOR;
|
|
static _capnp = {
|
|
displayName: "Member",
|
|
id: "85c316fd4114aba7",
|
|
size: new $.ObjectSize(8, 2),
|
|
};
|
|
_adoptMethod(value) {
|
|
$.utils.setUint16(0, 0, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownMethod() {
|
|
return $.utils.disown(this.method);
|
|
}
|
|
/**
|
|
* any kind of method
|
|
*
|
|
*/
|
|
get method() {
|
|
$.utils.testWhich("method", $.utils.getUint16(0, this), 0, this);
|
|
return $.utils.getStruct(0, Method, this);
|
|
}
|
|
_hasMethod() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initMethod() {
|
|
$.utils.setUint16(0, 0, this);
|
|
return $.utils.initStructAt(0, Method, this);
|
|
}
|
|
get _isMethod() {
|
|
return $.utils.getUint16(0, this) === 0;
|
|
}
|
|
set method(value) {
|
|
$.utils.setUint16(0, 0, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptProperty(value) {
|
|
$.utils.setUint16(0, 1, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownProperty() {
|
|
return $.utils.disown(this.property);
|
|
}
|
|
/**
|
|
* any kind of property
|
|
*
|
|
*/
|
|
get property() {
|
|
$.utils.testWhich("property", $.utils.getUint16(0, this), 1, this);
|
|
return $.utils.getStruct(0, Property, this);
|
|
}
|
|
_hasProperty() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initProperty() {
|
|
$.utils.setUint16(0, 1, this);
|
|
return $.utils.initStructAt(0, Property, this);
|
|
}
|
|
get _isProperty() {
|
|
return $.utils.getUint16(0, this) === 1;
|
|
}
|
|
set property(value) {
|
|
$.utils.setUint16(0, 1, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
/**
|
|
* nested type
|
|
*
|
|
*/
|
|
get nested() {
|
|
$.utils.testWhich("nested", $.utils.getUint16(0, this), 2, this);
|
|
return $.utils.getAs(Member_Nested, this);
|
|
}
|
|
_initNested() {
|
|
$.utils.setUint16(0, 2, this);
|
|
return $.utils.getAs(Member_Nested, this);
|
|
}
|
|
get _isNested() {
|
|
return $.utils.getUint16(0, this) === 2;
|
|
}
|
|
set nested(_) {
|
|
$.utils.setUint16(0, 2, this);
|
|
}
|
|
_adoptConstant(value) {
|
|
$.utils.setUint16(0, 3, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownConstant() {
|
|
return $.utils.disown(this.constant);
|
|
}
|
|
/**
|
|
* static constant
|
|
*
|
|
*/
|
|
get constant() {
|
|
$.utils.testWhich("constant", $.utils.getUint16(0, this), 3, this);
|
|
return $.utils.getStruct(0, Constant, this);
|
|
}
|
|
_hasConstant() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initConstant() {
|
|
$.utils.setUint16(0, 3, this);
|
|
return $.utils.initStructAt(0, Constant, this);
|
|
}
|
|
get _isConstant() {
|
|
return $.utils.getUint16(0, this) === 3;
|
|
}
|
|
set constant(value) {
|
|
$.utils.setUint16(0, 3, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptConstructor(value) {
|
|
$.utils.setUint16(0, 4, this);
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownConstructor() {
|
|
return $.utils.disown(this.$constructor);
|
|
}
|
|
/**
|
|
* structure constructor
|
|
*
|
|
*/
|
|
get $constructor() {
|
|
$.utils.testWhich("constructor", $.utils.getUint16(0, this), 4, this);
|
|
return $.utils.getStruct(0, Constructor, this);
|
|
}
|
|
_hasConstructor() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initConstructor() {
|
|
$.utils.setUint16(0, 4, this);
|
|
return $.utils.initStructAt(0, Constructor, this);
|
|
}
|
|
get _isConstructor() {
|
|
return $.utils.getUint16(0, this) === 4;
|
|
}
|
|
set $constructor(value) {
|
|
$.utils.setUint16(0, 4, this);
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString() { return "Member_" + super.toString(); }
|
|
which() {
|
|
return $.utils.getUint16(0, this);
|
|
}
|
|
}
|
|
export class Method extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "Method",
|
|
id: "a0a20f19ed7321e8",
|
|
size: new $.ObjectSize(8, 3),
|
|
};
|
|
static _Args;
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
_adoptReturnType(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownReturnType() {
|
|
return $.utils.disown(this.returnType);
|
|
}
|
|
get returnType() {
|
|
return $.utils.getStruct(1, Type, this);
|
|
}
|
|
_hasReturnType() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initReturnType() {
|
|
return $.utils.initStructAt(1, Type, this);
|
|
}
|
|
set returnType(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
_adoptArgs(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(2, this));
|
|
}
|
|
_disownArgs() {
|
|
return $.utils.disown(this.args);
|
|
}
|
|
get args() {
|
|
return $.utils.getList(2, Method._Args, this);
|
|
}
|
|
_hasArgs() {
|
|
return !$.utils.isNull($.utils.getPointer(2, this));
|
|
}
|
|
_initArgs(length) {
|
|
return $.utils.initList(2, Method._Args, length, this);
|
|
}
|
|
set args(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(2, this));
|
|
}
|
|
get static() {
|
|
return $.utils.getBit(0, this);
|
|
}
|
|
set static(value) {
|
|
$.utils.setBit(0, value, this);
|
|
}
|
|
toString() { return "Method_" + super.toString(); }
|
|
}
|
|
export class Property extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "Property",
|
|
id: "e1d238e9fecd3757",
|
|
size: new $.ObjectSize(8, 2),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
_adoptType(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownType() {
|
|
return $.utils.disown(this.type);
|
|
}
|
|
get type() {
|
|
return $.utils.getStruct(1, Type, this);
|
|
}
|
|
_hasType() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initType() {
|
|
return $.utils.initStructAt(1, Type, this);
|
|
}
|
|
set type(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
get readonly() {
|
|
return $.utils.getBit(0, this);
|
|
}
|
|
set readonly(value) {
|
|
$.utils.setBit(0, value, this);
|
|
}
|
|
get lazy() {
|
|
return $.utils.getBit(1, this);
|
|
}
|
|
set lazy(value) {
|
|
$.utils.setBit(1, value, this);
|
|
}
|
|
get prototype() {
|
|
return $.utils.getBit(2, this);
|
|
}
|
|
set prototype(value) {
|
|
$.utils.setBit(2, value, this);
|
|
}
|
|
toString() { return "Property_" + super.toString(); }
|
|
}
|
|
/**
|
|
* static constant in the resource
|
|
*
|
|
*/
|
|
export class Constant extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "Constant",
|
|
id: "e354a1a55c4cfc59",
|
|
size: new $.ObjectSize(8, 1),
|
|
};
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
/**
|
|
* TODO: we may need a union here
|
|
*
|
|
*/
|
|
get value() {
|
|
return $.utils.getInt64(0, this);
|
|
}
|
|
set value(value) {
|
|
$.utils.setInt64(0, value, this);
|
|
}
|
|
toString() { return "Constant_" + super.toString(); }
|
|
}
|
|
export class Constructor extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "Constructor",
|
|
id: "f4610fdb47099d17",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
static _Args;
|
|
_adoptArgs(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownArgs() {
|
|
return $.utils.disown(this.args);
|
|
}
|
|
get args() {
|
|
return $.utils.getList(0, Constructor._Args, this);
|
|
}
|
|
_hasArgs() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initArgs(length) {
|
|
return $.utils.initList(0, Constructor._Args, length, this);
|
|
}
|
|
set args(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString() { return "Constructor_" + super.toString(); }
|
|
}
|
|
export const Module_Which = {
|
|
/**
|
|
* if anyone ever needs module type, it can be implemented by either fixing the Modules reference
|
|
* problem above or copying the original enum.
|
|
* type @1 :Modules.ModuleType;
|
|
*
|
|
*/
|
|
STRUCTURE_NAME: 0,
|
|
TS_DECLARATIONS: 1
|
|
};
|
|
export class Module extends $.Struct {
|
|
static STRUCTURE_NAME = Module_Which.STRUCTURE_NAME;
|
|
static TS_DECLARATIONS = Module_Which.TS_DECLARATIONS;
|
|
static _capnp = {
|
|
displayName: "Module",
|
|
id: "cd4221e3248069bd",
|
|
size: new $.ObjectSize(8, 2),
|
|
};
|
|
/**
|
|
* if anyone ever needs module type, it can be implemented by either fixing the Modules reference
|
|
* problem above or copying the original enum.
|
|
* type @1 :Modules.ModuleType;
|
|
*
|
|
*/
|
|
get specifier() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set specifier(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
get structureName() {
|
|
$.utils.testWhich("structureName", $.utils.getUint16(0, this), 0, this);
|
|
return $.utils.getText(1, this);
|
|
}
|
|
get _isStructureName() {
|
|
return $.utils.getUint16(0, this) === 0;
|
|
}
|
|
set structureName(value) {
|
|
$.utils.setUint16(0, 0, this);
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
get tsDeclarations() {
|
|
$.utils.testWhich("tsDeclarations", $.utils.getUint16(0, this), 1, this);
|
|
return $.utils.getText(1, this);
|
|
}
|
|
get _isTsDeclarations() {
|
|
return $.utils.getUint16(0, this) === 1;
|
|
}
|
|
set tsDeclarations(value) {
|
|
$.utils.setUint16(0, 1, this);
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "Module_" + super.toString(); }
|
|
which() {
|
|
return $.utils.getUint16(0, this);
|
|
}
|
|
}
|
|
/**
|
|
* Collection of related structures
|
|
*
|
|
*/
|
|
export class StructureGroups_StructureGroup extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "StructureGroup",
|
|
id: "fe89d9d03a268a31",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
static _Structures;
|
|
get name() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set name(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
_adoptStructures(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownStructures() {
|
|
return $.utils.disown(this.structures);
|
|
}
|
|
get structures() {
|
|
return $.utils.getList(1, StructureGroups_StructureGroup._Structures, this);
|
|
}
|
|
_hasStructures() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initStructures(length) {
|
|
return $.utils.initList(1, StructureGroups_StructureGroup._Structures, length, this);
|
|
}
|
|
set structures(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
toString() { return "StructureGroups_StructureGroup_" + super.toString(); }
|
|
}
|
|
/**
|
|
* Collection of structure groups, consumed by TypeScript definitions generator
|
|
*
|
|
*/
|
|
export class StructureGroups extends $.Struct {
|
|
static StructureGroup = StructureGroups_StructureGroup;
|
|
static _capnp = {
|
|
displayName: "StructureGroups",
|
|
id: "ed8c71dbb06eb831",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
static _Groups;
|
|
static _Modules;
|
|
_adoptGroups(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownGroups() {
|
|
return $.utils.disown(this.groups);
|
|
}
|
|
get groups() {
|
|
return $.utils.getList(0, StructureGroups._Groups, this);
|
|
}
|
|
_hasGroups() {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initGroups(length) {
|
|
return $.utils.initList(0, StructureGroups._Groups, length, this);
|
|
}
|
|
set groups(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptModules(value) {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownModules() {
|
|
return $.utils.disown(this.modules);
|
|
}
|
|
get modules() {
|
|
return $.utils.getList(1, StructureGroups._Modules, this);
|
|
}
|
|
_hasModules() {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initModules(length) {
|
|
return $.utils.initList(1, StructureGroups._Modules, length, this);
|
|
}
|
|
set modules(value) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
toString() { return "StructureGroups_" + super.toString(); }
|
|
}
|
|
/**
|
|
* special type for properties whose value is supplied by built-in javascript
|
|
*
|
|
*/
|
|
export class JsBuiltinType extends $.Struct {
|
|
static _capnp = {
|
|
displayName: "JsBuiltinType",
|
|
id: "ccf1cde29b10a0bb",
|
|
size: new $.ObjectSize(0, 2),
|
|
};
|
|
/**
|
|
* module from which the property is imported
|
|
*
|
|
*/
|
|
get module() {
|
|
return $.utils.getText(0, this);
|
|
}
|
|
set module(value) {
|
|
$.utils.setText(0, value, this);
|
|
}
|
|
/**
|
|
* export name of the property
|
|
*
|
|
*/
|
|
get export() {
|
|
return $.utils.getText(1, this);
|
|
}
|
|
set export(value) {
|
|
$.utils.setText(1, value, this);
|
|
}
|
|
toString() { return "JsBuiltinType_" + super.toString(); }
|
|
}
|
|
OneOfType._Variants = $.CompositeList(Type);
|
|
FunctionType._Args = $.CompositeList(Type);
|
|
Structure._Members = $.CompositeList(Member);
|
|
Structure._BuiltinModules = $.CompositeList(Module);
|
|
Method._Args = $.CompositeList(Type);
|
|
Constructor._Args = $.CompositeList(Type);
|
|
StructureGroups_StructureGroup._Structures = $.CompositeList(Structure);
|
|
StructureGroups._Groups = $.CompositeList(StructureGroups_StructureGroup);
|
|
StructureGroups._Modules = $.CompositeList(Module);
|