db.insert(Table).values() gives TypeScript error "Object literal may only specify known properties"
Before I begin, let me clarify I am suuuper new to Drizzle! Loving it so far!
Not sure if I should provide repro just yet (happy to later), but I am getting an issue where my table which currently is:
Is giving me this a long typescript error for the
values
method that basically boils down to this:
Object literal may only specify known properties, and authorId does not exist in type ...
When I run:
I feel like I am missing something basic, but I am scratching my head a bit! 😅
I have been able to successfully use the values
method with no problems with very similar other tables.
Thanks so much1 Reply
I fixed it... One second after asking.
I accidentally had
fileId
in the insert, which trips it up. The error says authorId
in addition to some other fields which confused me!