Hello. I'm using Kysely with PostgresDialect. My table has a column with type Json. When I try to insert an object with a Date property I get this error:
Type Date | null is not assignable to type JsonValue | undefined
Type Date is not assignable to type JsonValue | undefined
Type Date is not assignable to type JsonObject
Index signature for type string is missing in type Date
I was able to avoid the error either adding as any or using JSON.stringify before the insert.
Is there a better solution to this issue?
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Hello. I'm using Kysely with PostgresDialect. My table has a column with type
Json
. When I try to insert an object with a Date property I get this error:I was able to avoid the error either adding
as any
or usingJSON.stringify
before the insert.Is there a better solution to this issue?
Upvote & Fund