@powerlines/deepkit 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capnp.cjs +48 -47
- package/dist/capnp.js +3 -2
- package/dist/{chunk-TVDEXHJN.js → chunk-2ODODKQQ.js} +8 -9
- package/dist/{chunk-KYFUOGZ6.cjs → chunk-6QPIKQMO.cjs} +9 -10
- package/dist/chunk-7J3ZDT6O.cjs +30 -0
- package/dist/chunk-C7BRLIIA.js +187 -0
- package/dist/{chunk-55HOZO7D.cjs → chunk-EKHXI2JI.cjs} +5 -7
- package/dist/chunk-GRNJVY7I.cjs +19 -0
- package/dist/{chunk-DGXATHAN.js → chunk-I5CVIT7W.js} +41 -46
- package/dist/chunk-IRPJW6HH.js +16 -0
- package/dist/{chunk-SKYW5GV2.cjs → chunk-J2FVIV7W.cjs} +127 -132
- package/dist/chunk-J4SVRFV4.js +127 -0
- package/dist/{chunk-BTXPY3B4.js → chunk-LPLPOVLC.js} +2 -4
- package/dist/{chunk-FEBG7WWO.js → chunk-MEMIQ5AA.js} +1 -3
- package/dist/{chunk-U4JSDAXK.js → chunk-MNUBEEIW.js} +12 -7
- package/dist/chunk-ORA4UQMU.cjs +2 -0
- package/dist/chunk-OULCUN6I.js +1 -0
- package/dist/chunk-QABG54Y3.cjs +193 -0
- package/dist/chunk-QLKLDV3V.cjs +135 -0
- package/dist/{chunk-JHEBLHYK.cjs → chunk-VMRRVNO2.cjs} +2 -4
- package/dist/chunk-VXZTOOL6.cjs +69 -0
- package/dist/chunk-XGQQM64U.js +8 -0
- package/dist/esbuild-plugin.cjs +5 -5
- package/dist/esbuild-plugin.d.cts +3 -2
- package/dist/esbuild-plugin.d.ts +3 -2
- package/dist/esbuild-plugin.js +4 -4
- package/dist/index.cjs +69 -69
- package/dist/index.js +10 -12
- package/dist/reflect-type.cjs +7 -6
- package/dist/reflect-type.js +6 -5
- package/dist/resolve-reflections.cjs +3 -3
- package/dist/resolve-reflections.js +2 -2
- package/dist/transformer.cjs +4 -4
- package/dist/transformer.js +2 -2
- package/dist/transpile.cjs +4 -4
- package/dist/transpile.js +3 -3
- package/dist/types.cjs +1 -2
- package/dist/types.js +1 -2
- package/dist/utilities.cjs +10 -9
- package/dist/utilities.js +3 -2
- package/dist/vendor/chunk-IOMA7ABE.js +359 -0
- package/dist/vendor/chunk-K5KCTNDL.cjs +2678 -0
- package/dist/vendor/chunk-L3KIZV6P.js +2664 -0
- package/dist/vendor/chunk-M3FJ3QXG.cjs +377 -0
- package/dist/vendor/compiler.cjs +12 -13
- package/dist/vendor/compiler.js +2 -5
- package/dist/vendor/config.cjs +9 -10
- package/dist/vendor/config.js +1 -5
- package/dist/vendor/core.cjs +130 -130
- package/dist/vendor/core.js +2 -5
- package/dist/vendor/index.cjs +42 -22
- package/dist/vendor/index.d.cts +2 -0
- package/dist/vendor/index.d.ts +2 -0
- package/dist/vendor/index.js +4 -11
- package/dist/vendor/type-spec.cjs +5 -5
- package/dist/vendor/type-spec.js +2 -5
- package/dist/vendor/type.cjs +2269 -691
- package/dist/vendor/type.js +1607 -92
- package/package.json +5 -5
- package/dist/chunk-2V4ET57D.js +0 -6954
- package/dist/chunk-4WJJKR53.js +0 -3731
- package/dist/chunk-6ETLMANX.js +0 -3472
- package/dist/chunk-6IQVU53O.cjs +0 -24
- package/dist/chunk-6OXPIOZY.cjs +0 -43
- package/dist/chunk-7WAH4JD3.js +0 -115
- package/dist/chunk-B4PTD5KQ.js +0 -4
- package/dist/chunk-ITQKPDCW.cjs +0 -3859
- package/dist/chunk-LBHO5BRF.js +0 -2251
- package/dist/chunk-OYRIJX67.cjs +0 -3487
- package/dist/chunk-PANPZ6S6.cjs +0 -6
- package/dist/chunk-QPSZUUB6.cjs +0 -2259
- package/dist/chunk-QQ7GKXIS.js +0 -43
- package/dist/chunk-SA3DCC4M.cjs +0 -6968
- package/dist/chunk-WVKPC33H.cjs +0 -49
- package/dist/chunk-YKFG2BZQ.cjs +0 -115
- package/dist/chunk-YUO4MCOI.js +0 -18
- package/dist/vendor/chunk-MCNMRQDT.js +0 -3513
- package/dist/vendor/chunk-RH4YMONA.js +0 -7064
- package/dist/vendor/chunk-RZKB5IQZ.cjs +0 -3531
- package/dist/vendor/chunk-WOXMCJJU.cjs +0 -7078
- package/dist/vendor/type-compiler/compiler.cjs +0 -46
- package/dist/vendor/type-compiler/compiler.d.cts +0 -1
- package/dist/vendor/type-compiler/compiler.d.ts +0 -1
- package/dist/vendor/type-compiler/compiler.js +0 -7
- package/dist/vendor/type-compiler/config.cjs +0 -36
- package/dist/vendor/type-compiler/config.d.cts +0 -6
- package/dist/vendor/type-compiler/config.d.ts +0 -6
- package/dist/vendor/type-compiler/config.js +0 -5
- package/dist/vendor/type-compiler/index.cjs +0 -108
- package/dist/vendor/type-compiler/index.d.cts +0 -1
- package/dist/vendor/type-compiler/index.d.ts +0 -1
- package/dist/vendor/type-compiler/index.js +0 -67
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type_exports } from './chunk-XGQQM64U.js';
|
|
2
|
+
import { __name } from './chunk-IRPJW6HH.js';
|
|
3
3
|
import { isSetObject, isUndefined, isInteger } from '@stryke/type-checks';
|
|
4
4
|
import * as $ from '@stryke/capnp';
|
|
5
5
|
|
|
6
|
-
// src/capnp.ts
|
|
7
|
-
init_esm_shims();
|
|
8
|
-
|
|
9
|
-
// schemas/reflection.ts
|
|
10
|
-
init_esm_shims();
|
|
11
6
|
BigInt("0xae3c363dcecf2729");
|
|
12
7
|
var ReflectionVisibility = {
|
|
13
8
|
PUBLIC: 0,
|
|
@@ -4199,55 +4194,55 @@ function convertFromCapnpIndexAccessOrigin(serializedType) {
|
|
|
4199
4194
|
}
|
|
4200
4195
|
__name(convertFromCapnpIndexAccessOrigin, "convertFromCapnpIndexAccessOrigin");
|
|
4201
4196
|
function convertToCapnpBase(serializedType, result) {
|
|
4202
|
-
if (serializedType.kind === ReflectionKind.objectLiteral) {
|
|
4197
|
+
if (serializedType.kind === type_exports.ReflectionKind.objectLiteral) {
|
|
4203
4198
|
const objectLiteral = result._initObjectLiteral();
|
|
4204
4199
|
convertToCapnpObjectLiteral(serializedType, objectLiteral);
|
|
4205
|
-
} else if (serializedType.kind === ReflectionKind.class) {
|
|
4200
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.class) {
|
|
4206
4201
|
const classType = result._initClassType();
|
|
4207
4202
|
convertToCapnpClassType(serializedType, classType);
|
|
4208
|
-
} else if (serializedType.kind === ReflectionKind.parameter) {
|
|
4203
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.parameter) {
|
|
4209
4204
|
const parameter = result._initParameter();
|
|
4210
4205
|
convertToCapnpParameter(serializedType, parameter);
|
|
4211
|
-
} else if (serializedType.kind === ReflectionKind.function) {
|
|
4206
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.function) {
|
|
4212
4207
|
const functionType = result._initFunction();
|
|
4213
4208
|
convertToCapnpFunction(serializedType, functionType);
|
|
4214
|
-
} else if (serializedType.kind === ReflectionKind.method) {
|
|
4209
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.method) {
|
|
4215
4210
|
const methodType = result._initMethod();
|
|
4216
4211
|
convertToCapnpMethod(serializedType, methodType);
|
|
4217
|
-
} else if (serializedType.kind === ReflectionKind.infer) {
|
|
4212
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.infer) {
|
|
4218
4213
|
const inferType = result._initInfer();
|
|
4219
4214
|
convertToCapnpInfer(serializedType, inferType);
|
|
4220
|
-
} else if (serializedType.kind === ReflectionKind.union) {
|
|
4215
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.union) {
|
|
4221
4216
|
const unionType = result._initUnion();
|
|
4222
4217
|
convertToCapnpUnion(serializedType, unionType);
|
|
4223
|
-
} else if (serializedType.kind === ReflectionKind.array) {
|
|
4218
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.array) {
|
|
4224
4219
|
const arrayType = result._initArray();
|
|
4225
4220
|
convertToCapnpArray(serializedType, arrayType);
|
|
4226
|
-
} else if (serializedType.kind === ReflectionKind.intersection) {
|
|
4221
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.intersection) {
|
|
4227
4222
|
const intersectionType = result._initIntersection();
|
|
4228
4223
|
convertToCapnpIntersection(serializedType, intersectionType);
|
|
4229
|
-
} else if (serializedType.kind === ReflectionKind.enum) {
|
|
4224
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.enum) {
|
|
4230
4225
|
const enumType = result._initEnum();
|
|
4231
4226
|
convertToCapnpEnum(serializedType, enumType);
|
|
4232
|
-
} else if (serializedType.kind === ReflectionKind.property) {
|
|
4227
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.property) {
|
|
4233
4228
|
const propertyType = result._initProperty();
|
|
4234
4229
|
convertToCapnpProperty(serializedType, propertyType);
|
|
4235
|
-
} else if (serializedType.kind === ReflectionKind.tuple) {
|
|
4230
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.tuple) {
|
|
4236
4231
|
const tupleType = result._initTuple();
|
|
4237
4232
|
convertToCapnpTuple(serializedType, tupleType);
|
|
4238
|
-
} else if (serializedType.kind === ReflectionKind.tupleMember) {
|
|
4233
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.tupleMember) {
|
|
4239
4234
|
const tupleMemberType = result._initTupleMember();
|
|
4240
4235
|
convertToCapnpTupleMember(serializedType, tupleMemberType);
|
|
4241
|
-
} else if (serializedType.kind === ReflectionKind.propertySignature) {
|
|
4236
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.propertySignature) {
|
|
4242
4237
|
const propertySignatureType = result._initPropertySignature();
|
|
4243
4238
|
convertToCapnpPropertySignature(serializedType, propertySignatureType);
|
|
4244
|
-
} else if (serializedType.kind === ReflectionKind.methodSignature) {
|
|
4239
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.methodSignature) {
|
|
4245
4240
|
const methodSignatureType = result._initMethodSignature();
|
|
4246
4241
|
convertToCapnpMethodSignature(serializedType, methodSignatureType);
|
|
4247
|
-
} else if (serializedType.kind === ReflectionKind.literal) {
|
|
4242
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.literal) {
|
|
4248
4243
|
const literalType = result._initLiteral();
|
|
4249
4244
|
convertToCapnpLiteral(serializedType, literalType);
|
|
4250
|
-
} else if (serializedType.kind === ReflectionKind.never || serializedType.kind === ReflectionKind.any || serializedType.kind === ReflectionKind.unknown || serializedType.kind === ReflectionKind.void || serializedType.kind === ReflectionKind.object || serializedType.kind === ReflectionKind.string || serializedType.kind === ReflectionKind.number || serializedType.kind === ReflectionKind.boolean || serializedType.kind === ReflectionKind.symbol || serializedType.kind === ReflectionKind.bigint || serializedType.kind === ReflectionKind.null || serializedType.kind === ReflectionKind.undefined || serializedType.kind === ReflectionKind.regexp) {
|
|
4245
|
+
} else if (serializedType.kind === type_exports.ReflectionKind.never || serializedType.kind === type_exports.ReflectionKind.any || serializedType.kind === type_exports.ReflectionKind.unknown || serializedType.kind === type_exports.ReflectionKind.void || serializedType.kind === type_exports.ReflectionKind.object || serializedType.kind === type_exports.ReflectionKind.string || serializedType.kind === type_exports.ReflectionKind.number || serializedType.kind === type_exports.ReflectionKind.boolean || serializedType.kind === type_exports.ReflectionKind.symbol || serializedType.kind === type_exports.ReflectionKind.bigint || serializedType.kind === type_exports.ReflectionKind.null || serializedType.kind === type_exports.ReflectionKind.undefined || serializedType.kind === type_exports.ReflectionKind.regexp) {
|
|
4251
4246
|
const simpleType = result._initSimple();
|
|
4252
4247
|
convertToCapnpSimple(serializedType, simpleType);
|
|
4253
4248
|
} else {
|
|
@@ -4356,7 +4351,7 @@ function convertToCapnpSimple(serializedType, result) {
|
|
|
4356
4351
|
__name(convertToCapnpSimple, "convertToCapnpSimple");
|
|
4357
4352
|
function convertFromCapnpLiteral(serializedType) {
|
|
4358
4353
|
const result = {
|
|
4359
|
-
kind: ReflectionKind.literal,
|
|
4354
|
+
kind: type_exports.ReflectionKind.literal,
|
|
4360
4355
|
literal: serializedType.literal._isString ? serializedType.literal.string : serializedType.literal._isNumber ? serializedType.literal.number : serializedType.literal._isBoolean ? serializedType.literal.boolean : serializedType.literal._isBigint ? {
|
|
4361
4356
|
type: "bigint",
|
|
4362
4357
|
value: serializedType.literal.bigint.value
|
|
@@ -4421,7 +4416,7 @@ function convertToCapnpLiteral(serializedType, result) {
|
|
|
4421
4416
|
__name(convertToCapnpLiteral, "convertToCapnpLiteral");
|
|
4422
4417
|
function convertFromCapnpMethodSignature(serializedType) {
|
|
4423
4418
|
const result = {
|
|
4424
|
-
kind: ReflectionKind.methodSignature,
|
|
4419
|
+
kind: type_exports.ReflectionKind.methodSignature,
|
|
4425
4420
|
name: serializedType.name,
|
|
4426
4421
|
typeName: serializedType.typeName || void 0,
|
|
4427
4422
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4463,7 +4458,7 @@ function convertToCapnpMethodSignature(serializedType, result) {
|
|
|
4463
4458
|
__name(convertToCapnpMethodSignature, "convertToCapnpMethodSignature");
|
|
4464
4459
|
function convertFromCapnpPropertySignature(serializedType) {
|
|
4465
4460
|
const result = {
|
|
4466
|
-
kind: ReflectionKind.propertySignature,
|
|
4461
|
+
kind: type_exports.ReflectionKind.propertySignature,
|
|
4467
4462
|
name: serializedType.name,
|
|
4468
4463
|
typeName: serializedType.typeName || void 0,
|
|
4469
4464
|
description: serializedType.description,
|
|
@@ -4576,7 +4571,7 @@ function convertToCapnpTupleMember(serializedType, result) {
|
|
|
4576
4571
|
__name(convertToCapnpTupleMember, "convertToCapnpTupleMember");
|
|
4577
4572
|
function convertFromCapnpTupleMember(serializedType) {
|
|
4578
4573
|
const result = {
|
|
4579
|
-
kind: ReflectionKind.tupleMember,
|
|
4574
|
+
kind: type_exports.ReflectionKind.tupleMember,
|
|
4580
4575
|
type: serializedType.type.id,
|
|
4581
4576
|
typeName: serializedType.typeName || void 0,
|
|
4582
4577
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4617,7 +4612,7 @@ function convertToCapnpTuple(serializedType, result) {
|
|
|
4617
4612
|
__name(convertToCapnpTuple, "convertToCapnpTuple");
|
|
4618
4613
|
function convertFromCapnpTuple(serializedType) {
|
|
4619
4614
|
const result = {
|
|
4620
|
-
kind: ReflectionKind.tuple,
|
|
4615
|
+
kind: type_exports.ReflectionKind.tuple,
|
|
4621
4616
|
typeName: serializedType.typeName || void 0,
|
|
4622
4617
|
types: serializedType._hasTypes() ? serializedType.types.map((t) => convertFromCapnpTupleMember(t)) : [],
|
|
4623
4618
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4633,7 +4628,7 @@ function convertToCapnpProperty(serializedType, result) {
|
|
|
4633
4628
|
result.description = serializedType.description || "";
|
|
4634
4629
|
result.optional = serializedType.optional ?? false;
|
|
4635
4630
|
result.readonly = serializedType.readonly ?? false;
|
|
4636
|
-
result.visibility = serializedType.visibility === ReflectionVisibility
|
|
4631
|
+
result.visibility = serializedType.visibility === type_exports.ReflectionVisibility.public ? ReflectionVisibility.PUBLIC : serializedType.visibility === type_exports.ReflectionVisibility.protected ? ReflectionVisibility.PROTECTED : ReflectionVisibility.PRIVATE;
|
|
4637
4632
|
result.abstract = serializedType.abstract ?? false;
|
|
4638
4633
|
result.name = String(serializedType.name) || "";
|
|
4639
4634
|
if (typeof serializedType.default !== "undefined") {
|
|
@@ -4669,13 +4664,13 @@ function convertToCapnpProperty(serializedType, result) {
|
|
|
4669
4664
|
__name(convertToCapnpProperty, "convertToCapnpProperty");
|
|
4670
4665
|
function convertFromCapnpProperty(serializedType) {
|
|
4671
4666
|
const result = {
|
|
4672
|
-
kind: ReflectionKind.property,
|
|
4667
|
+
kind: type_exports.ReflectionKind.property,
|
|
4673
4668
|
typeName: serializedType.typeName || void 0,
|
|
4674
4669
|
description: serializedType.description,
|
|
4675
4670
|
default: convertFromCapnpDefault(serializedType.default),
|
|
4676
4671
|
optional: serializedType.optional ? true : void 0,
|
|
4677
4672
|
readonly: serializedType.readonly ? true : void 0,
|
|
4678
|
-
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? ReflectionVisibility
|
|
4673
|
+
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? type_exports.ReflectionVisibility.public : serializedType.visibility === ReflectionVisibility.PROTECTED ? type_exports.ReflectionVisibility.protected : type_exports.ReflectionVisibility.private,
|
|
4679
4674
|
abstract: serializedType.abstract ? true : void 0,
|
|
4680
4675
|
name: serializedType.name,
|
|
4681
4676
|
type: serializedType.type.id,
|
|
@@ -4731,7 +4726,7 @@ function convertToCapnpEnum(serializedType, result) {
|
|
|
4731
4726
|
__name(convertToCapnpEnum, "convertToCapnpEnum");
|
|
4732
4727
|
function convertFromCapnpEnum(serializedType) {
|
|
4733
4728
|
const result = {
|
|
4734
|
-
kind: ReflectionKind.enum,
|
|
4729
|
+
kind: type_exports.ReflectionKind.enum,
|
|
4735
4730
|
typeName: serializedType.typeName || void 0,
|
|
4736
4731
|
indexType: serializedType.indexType.id,
|
|
4737
4732
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4778,7 +4773,7 @@ function convertToCapnpIntersection(serializedType, result) {
|
|
|
4778
4773
|
__name(convertToCapnpIntersection, "convertToCapnpIntersection");
|
|
4779
4774
|
function convertFromCapnpIntersection(serializedType) {
|
|
4780
4775
|
const result = {
|
|
4781
|
-
kind: ReflectionKind.intersection,
|
|
4776
|
+
kind: type_exports.ReflectionKind.intersection,
|
|
4782
4777
|
typeName: serializedType.typeName || void 0,
|
|
4783
4778
|
types: serializedType._hasTypes() ? serializedType.types.map((t) => t.id) : [],
|
|
4784
4779
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4820,7 +4815,7 @@ function convertToCapnpArray(serializedType, result) {
|
|
|
4820
4815
|
__name(convertToCapnpArray, "convertToCapnpArray");
|
|
4821
4816
|
function convertFromCapnpArray(serializedType) {
|
|
4822
4817
|
const result = {
|
|
4823
|
-
kind: ReflectionKind.array,
|
|
4818
|
+
kind: type_exports.ReflectionKind.array,
|
|
4824
4819
|
typeName: serializedType.typeName || void 0,
|
|
4825
4820
|
type: serializedType.type.id,
|
|
4826
4821
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4862,7 +4857,7 @@ function convertToCapnpUnion(serializedType, result) {
|
|
|
4862
4857
|
__name(convertToCapnpUnion, "convertToCapnpUnion");
|
|
4863
4858
|
function convertFromCapnpUnion(serializedType) {
|
|
4864
4859
|
const result = {
|
|
4865
|
-
kind: ReflectionKind.union,
|
|
4860
|
+
kind: type_exports.ReflectionKind.union,
|
|
4866
4861
|
typeName: serializedType.typeName || void 0,
|
|
4867
4862
|
types: serializedType._hasTypes() ? serializedType.types.map((t) => t.id) : [],
|
|
4868
4863
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -4898,7 +4893,7 @@ function convertToCapnpInfer(serializedType, result) {
|
|
|
4898
4893
|
__name(convertToCapnpInfer, "convertToCapnpInfer");
|
|
4899
4894
|
function convertFromCapnpInfer(serializedType) {
|
|
4900
4895
|
const result = {
|
|
4901
|
-
kind: ReflectionKind.infer,
|
|
4896
|
+
kind: type_exports.ReflectionKind.infer,
|
|
4902
4897
|
typeName: serializedType.typeName || void 0,
|
|
4903
4898
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
4904
4899
|
typeArguments: serializedType._hasTypeArguments() ? serializedType.typeArguments.map((t) => t.id) : void 0,
|
|
@@ -4950,7 +4945,7 @@ function convertToCapnpMethod(serializedType, result) {
|
|
|
4950
4945
|
result.kind = serializedType.kind;
|
|
4951
4946
|
result.typeName = serializedType.typeName || "";
|
|
4952
4947
|
result.abstract = serializedType.abstract ?? false;
|
|
4953
|
-
result.visibility = serializedType.visibility === ReflectionVisibility
|
|
4948
|
+
result.visibility = serializedType.visibility === type_exports.ReflectionVisibility.public ? ReflectionVisibility.PUBLIC : serializedType.visibility === type_exports.ReflectionVisibility.protected ? ReflectionVisibility.PROTECTED : ReflectionVisibility.PRIVATE;
|
|
4954
4949
|
if (serializedType.decorators?.length) {
|
|
4955
4950
|
const decorators = result._initDecorators(serializedType.decorators.length);
|
|
4956
4951
|
serializedType.decorators.forEach((d, index) => {
|
|
@@ -4987,7 +4982,7 @@ function convertToCapnpMethod(serializedType, result) {
|
|
|
4987
4982
|
__name(convertToCapnpMethod, "convertToCapnpMethod");
|
|
4988
4983
|
function convertFromCapnpFunction(serializedType) {
|
|
4989
4984
|
const result = {
|
|
4990
|
-
kind: ReflectionKind.function,
|
|
4985
|
+
kind: type_exports.ReflectionKind.function,
|
|
4991
4986
|
name: serializedType.name,
|
|
4992
4987
|
typeName: serializedType.typeName || void 0,
|
|
4993
4988
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
@@ -5002,12 +4997,12 @@ function convertFromCapnpFunction(serializedType) {
|
|
|
5002
4997
|
__name(convertFromCapnpFunction, "convertFromCapnpFunction");
|
|
5003
4998
|
function convertFromCapnpMethod(serializedType) {
|
|
5004
4999
|
const result = {
|
|
5005
|
-
kind: ReflectionKind.method,
|
|
5000
|
+
kind: type_exports.ReflectionKind.method,
|
|
5006
5001
|
name: serializedType.name,
|
|
5007
5002
|
typeName: serializedType.typeName || void 0,
|
|
5008
5003
|
abstract: serializedType.abstract ? true : void 0,
|
|
5009
5004
|
return: serializedType.return.id,
|
|
5010
|
-
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? ReflectionVisibility
|
|
5005
|
+
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? type_exports.ReflectionVisibility.public : serializedType.visibility === ReflectionVisibility.PROTECTED ? type_exports.ReflectionVisibility.protected : type_exports.ReflectionVisibility.private,
|
|
5011
5006
|
parameters: serializedType._hasParameters() ? serializedType.parameters.map((parameter) => convertFromCapnpParameter(parameter)) : []
|
|
5012
5007
|
};
|
|
5013
5008
|
return result;
|
|
@@ -5063,7 +5058,7 @@ function convertToCapnpClassType(serializedType, result) {
|
|
|
5063
5058
|
__name(convertToCapnpClassType, "convertToCapnpClassType");
|
|
5064
5059
|
function convertFromCapnpClassType(serializedType) {
|
|
5065
5060
|
const result = {
|
|
5066
|
-
kind: ReflectionKind.class,
|
|
5061
|
+
kind: type_exports.ReflectionKind.class,
|
|
5067
5062
|
typeName: serializedType.typeName || void 0,
|
|
5068
5063
|
classType: serializedType.classType,
|
|
5069
5064
|
globalObject: serializedType.globalObject ? true : void 0,
|
|
@@ -5114,7 +5109,7 @@ function convertToCapnpObjectLiteral(serializedType, result) {
|
|
|
5114
5109
|
__name(convertToCapnpObjectLiteral, "convertToCapnpObjectLiteral");
|
|
5115
5110
|
function convertFromCapnpObjectLiteral(serializedType) {
|
|
5116
5111
|
const result = {
|
|
5117
|
-
kind: ReflectionKind.objectLiteral,
|
|
5112
|
+
kind: type_exports.ReflectionKind.objectLiteral,
|
|
5118
5113
|
typeName: serializedType.typeName || void 0,
|
|
5119
5114
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
5120
5115
|
types: serializedType._hasTypes() ? serializedType.types.map((t) => t.id) : [],
|
|
@@ -5131,7 +5126,7 @@ function convertToCapnpParameter(serializedType, result) {
|
|
|
5131
5126
|
result.name = serializedType.name || "";
|
|
5132
5127
|
result.optional = serializedType.optional ?? false;
|
|
5133
5128
|
result.readonly = serializedType.readonly ?? false;
|
|
5134
|
-
result.visibility = serializedType.visibility === ReflectionVisibility
|
|
5129
|
+
result.visibility = serializedType.visibility === type_exports.ReflectionVisibility.public ? ReflectionVisibility.PUBLIC : serializedType.visibility === type_exports.ReflectionVisibility.protected ? ReflectionVisibility.PROTECTED : ReflectionVisibility.PRIVATE;
|
|
5135
5130
|
if (typeof serializedType.default !== "undefined") {
|
|
5136
5131
|
const defaultValue = result._initDefault();
|
|
5137
5132
|
convertToCapnpDefault(serializedType.default, defaultValue);
|
|
@@ -5165,13 +5160,13 @@ function convertToCapnpParameter(serializedType, result) {
|
|
|
5165
5160
|
__name(convertToCapnpParameter, "convertToCapnpParameter");
|
|
5166
5161
|
function convertFromCapnpParameter(serializedType) {
|
|
5167
5162
|
const result = {
|
|
5168
|
-
kind: ReflectionKind.parameter,
|
|
5163
|
+
kind: type_exports.ReflectionKind.parameter,
|
|
5169
5164
|
typeName: serializedType.typeName || void 0,
|
|
5170
5165
|
name: serializedType.name,
|
|
5171
5166
|
default: convertFromCapnpDefault(serializedType.default),
|
|
5172
5167
|
optional: serializedType.optional ? true : void 0,
|
|
5173
5168
|
readonly: serializedType.readonly ? true : void 0,
|
|
5174
|
-
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? ReflectionVisibility
|
|
5169
|
+
visibility: serializedType.visibility === ReflectionVisibility.PUBLIC ? type_exports.ReflectionVisibility.public : serializedType.visibility === ReflectionVisibility.PROTECTED ? type_exports.ReflectionVisibility.protected : type_exports.ReflectionVisibility.private,
|
|
5175
5170
|
type: serializedType.type.id,
|
|
5176
5171
|
decorators: serializedType._hasDecorators() ? serializedType.decorators.map((d) => d.id) : void 0,
|
|
5177
5172
|
typeArguments: serializedType._hasTypeArguments() ? serializedType.typeArguments.map((t) => t.id) : void 0,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
|
|
16
|
+
export { __name, __reExport };
|