Open christiannnc opened 6 months ago
I just bumped my version to 0.14.0 and it looks like I get the same issue complaining about the generic Generated type. I was able to resolve it by doing 'as unknown as number', but I thought I'd create an issue in case this isn't expected behavior.
On Sun, Mar 17, 2024 at 11:57 PM Robin Blomberg @.***> wrote:
What version of kysely-codegen are you using? I released 0.14.0 yesterday which updated all dependencies.
— Reply to this email directly, view it on GitHub https://github.com/RobinBlomberg/kysely-codegen/issues/140#issuecomment-2003054325, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANTINPU6BSM2UGHPFQFNMZLYY2F6NAVCNFSM6AAAAABE2SNHIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBTGA2TIMZSGU . You are receiving this because you authored the thread.Message ID: @.***>
I think this is a duplicate of #90. Can you check that issue and tell me if it solves your problem?
I'm trying to insert a row into my Postgres database with Kysely, and it appears that the types provided by kysely-codegen are making it impossible. When running the following code, I get a Typescript error that says:
Type 'ColumnType<number, number | undefined, number>' is not assignable to type 'ValueExpression<DB, DB_TABLE.Address, number>'.
My code:
And here are my generated types for the address table:
Am I missing something here? I feel like I should be able to take the
id
property from a user and assignuserId
to that value, but Typescript disagrees.Upvote & Fund