Report hasn't been filed before.
What version of drizzle-orm are you using?
1.0.0-beta.22
What version of drizzle-kit are you using?
1.0.0-beta.22
Other packages
No response
Describe the Bug
My code:
const client = postgres(process.env.DATABASE_URL);
const db = globalForDB.db ?? drizzle(client, { relations });
TS2345: Argument of type
[Sql<{}>, {
relations: ExtractTablesWithRelations<{
sers: {
authTokens: any;
contentsAuthor: Many<"contents">;
};
userAuthTokens: {
belongUser: any;
};
contents: {
belongAuthor: any;
};
}, ExtractTablesFromSchema<{
userStatus: PgEnum<...>;
... 7 more ...;
contents: PgTableWithColumns<...>;
}>>;
}]
is not assignable to parameter of type
[string] | [string, DrizzleConfig<Record<string, never>, TablesRelationalConfig>] | [DrizzleConfig<Record<string, never>, TablesRelationalConfig> & ({ ...; } | { ...; })]
I try:
drizzle({ client, relations })
It's still the same error.
According to the prompt from the IDE, the type of relations is TRelationConfigs. But the type of defineRelations() is ExtractTablesWithRelations.
Report hasn't been filed before.
What version of
drizzle-ormare you using?1.0.0-beta.22
What version of
drizzle-kitare you using?1.0.0-beta.22
Other packages
No response
Describe the Bug
My code:
TS2345: Argument of type
is not assignable to parameter of type
I try:
It's still the same error.
According to the prompt from the IDE, the type of
relationsisTRelationConfigs. But the type ofdefineRelations()isExtractTablesWithRelations.