RobinBlomberg / kysely-codegen

Generate Kysely type definitions from your database.
MIT License
815 stars 73 forks source link

ColumnTypes contain duplicate union types #217

Open RobinClowers opened 4 weeks ago

RobinClowers commented 4 weeks ago

Using kysely-codegen 0.17.0, I get this diff:

-export type Int8 = ColumnType<string, bigint | number | string>;
+export type Int8 = ColumnType<string, bigint | number | string, bigint | number | string>;

-export type Interval = ColumnType<IPostgresInterval, IPostgresInterval | number | string>;
+export type Interval = ColumnType<IPostgresInterval, IPostgresInterval | number | string, IPostgresInterval | number | string>;

-export type Numeric = ColumnType<string, number | string>;
+export type Numeric = ColumnType<string, number | string, number | string>;

-export type Timestamp = ColumnType<Date, Date | string>;
+export type Timestamp = ColumnType<Date, Date | string, Date | string>;

Upvote & Fund

Fund with Polar

RobinBlomberg commented 3 weeks ago

Hey! This was changed due to #203. It is however possible that we still want to deduplicate the types, but in a more correct manner.