Skip to content
This repository was archived by the owner on Jun 29, 2026. It is now read-only.

Commit ec13fba

Browse files
fix(typebox): kind is non-enumerable (#82)
1 parent 83e68a8 commit ec13fba

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/utils/typebox/union-oneof.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*--------------------------------------------------------------------------
22
3-
@sinclair/typebox/prototypes
3+
typebox/prototypes
44
55
The MIT License (MIT)
66
@@ -50,5 +50,10 @@ export function UnionOneOf<T extends TSchema[]>(
5050
oneOf: [...T],
5151
options: TSchemaOptions = {},
5252
) {
53-
return { ...options, "~kind": "UnionOneOf", oneOf } as TUnionOneOf<T>;
53+
const schema = { ...options, oneOf };
54+
Object.defineProperty(schema, "~kind", {
55+
value: "UnionOneOf",
56+
enumerable: false,
57+
});
58+
return schema as TUnionOneOf<T>;
5459
}

0 commit comments

Comments
 (0)