Similar to #1468 where spreading drops .narrow(), calling .partial() also silently drops it.
Reproduction
import { type } from "arktype";
const User = type({ name: "string", email: "string" })
.narrow((u) => u.email.includes("@"));
User({ name: "Yi", email: "bad" }); // ✗ rejected (correct)
const PatchUser = User.partial();
PatchUser({ email: "bad" }); // ✓ accepted — narrow is gone
Expected
Should either preserve the narrow or throw if it can't. As a quick fix, throwing when .partial() is applied to a narrowed/filtered schema would at least make the issue visible — similar to how Zod handles .partial() on refined schemas.
Environment
Similar to #1468 where spreading drops
.narrow(), calling.partial()also silently drops it.Reproduction
Expected
Should either preserve the narrow or throw if it can't. As a quick fix, throwing when
.partial()is applied to a narrowed/filtered schema would at least make the issue visible — similar to how Zod handles.partial()on refined schemas.Environment