How do I type db entities and their properties? #295
Unanswered
canrozanes
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following setup:
I'm trying to create a seeding utility that wraps a bunch of logic and then calls db.blogPosts.create function. How would I type the functions arguments
blogPostCreateOverridesbelow?Similarly, I need a utility function that takes in a blogPost, what should be the type of that? BlogPost could be:
But surely there has to be a cleaner way
Beta Was this translation helpful? Give feedback.
All reactions