From c342e7fc120d2d012f8c9d784c59c2e3e168cd9d Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Wed, 1 Apr 2026 22:13:09 -0700 Subject: [PATCH] fix(core): infer s.any() as any instead of unknown in validate return type InferSpecField mapped SchemaType<"any"> to unknown, which made catalog.validate() return types incompatible with Spec. Fields like visible: s.any() produced visible: unknown instead of visible: any, forcing as-casts. Now maps to any, matching Zod's z.any() behavior. Fixes #251 --- packages/core/src/schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/schema.ts b/packages/core/src/schema.ts index c5824454..3201654a 100644 --- a/packages/core/src/schema.ts +++ b/packages/core/src/schema.ts @@ -342,7 +342,8 @@ type InferSpecField = : T extends SchemaType<"propsOf", infer Path> ? InferPropsOfType : T extends SchemaType<"any"> - ? unknown + ? // eslint-disable-next-line @typescript-eslint/no-explicit-any + any : unknown; type InferRefType = Path extends "catalog.components"