This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
// Metro module 1330 (f1331).
import { MESSAGE_TYPE } from "./Module1318";
import { reflectionScalarDefault } from "./Module1328";
export function reflectionCreate(a0) {
const r0 = {};
Object.defineProperty(r0, MESSAGE_TYPE, {
enumerable: false,
value: a0
});
for (const field of a0.fields) {
const localName = field.localName;
if (!field.opt) {
const oneof = field.oneof;
if (oneof) {
r0[field.oneof] = {
oneofKind: void 0
};
} else if (field.repeat) {
r0[localName] = [];
} else {
const kind = field.kind;
if (kind === "scalar") {
r0[localName] = reflectionScalarDefault(field.T, field.L);
} else if (kind === "enum") {
r0[localName] = 0;
} else if (kind === "map") {
r0[localName] = {};
}
}
}
}
return r0;
}