Schema is valid for use in Confect. Remember that an Effect Schema looks like this:
Schemas used in Confect:
Typerepresents the value that you’ll be operating on in your code. Any TypeScript type is permitted here.Encodedrepresents the value that is stored in the database or serialized as the argument/output of a Convex function. This must be a valid Convex value.Contextis not currently supported. It should always benever.
Additional caveats
No-op returns from Convex functions
Unlike the vanilla APIs, Convex functions defined with Confect may not returnundefined or void—use null (Schema.Null as the returns validator) instead. Convex coerces undefined/void returns to null anyways—this just makes that more explicit.
✅
❌
❌