holdenH
Convex Community3y ago
11 replies
holden

Inferring full Typescript types from schema?

Hi friends! Trying out Convex for the first time (looks quite slick!), trying to migrate an existing NextJS app currently using vercel/postgres + Drizzle.

Two questions so far:

1. It looks like there's no Date or timestamp data type? My current models have created/updated/viewed times. _creationTime is great, but if I wanted to add the others, should I use int/float myself? Is creationTime in UTC?
2. How can I infer the full TypeScript type of a schema object? E.g. if I do this, it's missing the _id/_creationTime system fields.
image.png
Was this page helpful?