INPUTTypeScript
.ts1
export async function getUser(id: string): Promise<User> {
return db.users.findUnique({ where: { id } })
}
export async function createPost(
title: string, body: string, authorId: string
): Promise<Post> {
return db.posts.create({ data: { title, body, authorId } })
}
⌘↵ to convert
JSON
◈
← Paste input to begin
or press ⌘↵ to convert