diff --git a/src/utils/typebox/union-oneof.ts b/src/utils/typebox/union-oneof.ts index f529591..f43f99a 100644 --- a/src/utils/typebox/union-oneof.ts +++ b/src/utils/typebox/union-oneof.ts @@ -1,6 +1,6 @@ /*-------------------------------------------------------------------------- -@sinclair/typebox/prototypes +typebox/prototypes The MIT License (MIT) @@ -50,5 +50,10 @@ export function UnionOneOf( oneOf: [...T], options: TSchemaOptions = {}, ) { - return { ...options, "~kind": "UnionOneOf", oneOf } as TUnionOneOf; + const schema = { ...options, oneOf }; + Object.defineProperty(schema, "~kind", { + value: "UnionOneOf", + enumerable: false, + }); + return schema as TUnionOneOf; }