How to get InferModel to work with Relation model?

Is there a way to get the infer type for a relation model? eg:
type User = InferModel<typeof users, "select">;
type UserWithPosts = InferModel<typeof users, { posts: true }, "select" >;
Was this page helpful?