From 420649e530e89514e04b5f9afa17ee9f458584df Mon Sep 17 00:00:00 2001 From: MisterCommand Date: Wed, 25 Feb 2026 09:04:22 +0800 Subject: [PATCH 1/2] fix: type --- src/utils/typebox/union-oneof.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/utils/typebox/union-oneof.ts b/src/utils/typebox/union-oneof.ts index f529591..55d77f7 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; +} \ No newline at end of file From 0f96df6bdc8f6c927937cdcfe98aa9ffa4a20d4a Mon Sep 17 00:00:00 2001 From: MisterCommand Date: Wed, 25 Feb 2026 09:06:20 +0800 Subject: [PATCH 2/2] fix: lint and fmt --- src/utils/typebox/union-oneof.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/typebox/union-oneof.ts b/src/utils/typebox/union-oneof.ts index 55d77f7..f43f99a 100644 --- a/src/utils/typebox/union-oneof.ts +++ b/src/utils/typebox/union-oneof.ts @@ -56,4 +56,4 @@ export function UnionOneOf( enumerable: false, }); return schema as TUnionOneOf; -} \ No newline at end of file +}