diff --git a/packages/runtime/src/oneof.ts b/packages/runtime/src/oneof.ts index 87feebcf..ae29d333 100644 --- a/packages/runtime/src/oneof.ts +++ b/packages/runtime/src/oneof.ts @@ -158,3 +158,11 @@ export function getSelectedOneofValue (x: U): U & { oneofKind: keyof U} { + return { + ...x, + oneofKind: Object.keys(x)[0] + } +} + +