JSON to TypeScript for Prisma-Like Schema Definitions
Quick Answer: Paste a JSON object representing a database record to generate TypeScript interfaces matching Prisma model output. The generated types include proper null handling and relation types, similar to what Prisma Client generates from your schema.
FAQ
Does Prisma already generate TypeScript types?
Yes. Prisma Client auto-generates types from your schema.prisma file. This tool is useful when you have JSON data but no Prisma schema yet -- it helps you design the type structure.
How do I handle Prisma relations in types?
Prisma generates separate types for models with and without relations. Use Prisma.UserGetPayload<{include: {posts: true}}> for types including specific relations.