Providing optional columns to insert query results in type error
I have this table
-
creatorId
isn't anywhere in the auto complete
- Adding creatorId
in the values
object results in a type error.
Is this normal behavior? Am I not understanding something? π€8 Replies
It does work though, it's only typescript that doesn't like it
Sorry for bumping. Do I need to provide more context for this problem? What would help?
i would first question what youre importing
ah also... youre table has capital letter in it... that maybe the issue
I renamed the variable to
teamTable
to make sure it's the table from the schema and removed the capital T from the table name. Still doesn't allow me to pass creatorId
The type is there π€
ok whats in your tsconfig.json file is strict: true?
That might be it actually π
canβt try until tomorrow but this project was setup from scratch instead of my regular nextjs setup, so the tsconfig might be missing some things
Yep that was it, thanks @Darren π