burnstony#1975
burnstony#197511mo ago

create type in schema

if I want to create a type for a field in the schema where do I add it
1 Reply
erquhart
erquhart11mo ago
You would generally infer the type using Convex's Infer:
type MyType = Doc<'table_name'>['fieldName']
type MyType = Doc<'table_name'>['fieldName']
The schema's own types come from the validators used to define it, eg., v.boolean().

Did you find this page helpful?