You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue with the generated TypeScript types when using Supabase. For the past 4 days, the types generated by the command supabase gen types typescript are producing TypeScript errors such as 'never' is overridden by other types in this union type. as indicated by SonarLint (typescript:S6571).
Supabase and Environment Details:
Supabase CLI Version: ^1.204.3
Project Setup: Using Next.js with standard TypeScript configuration
TypeScript Configuration: Default configuration provided by Next.js
If anyone is having this issue with Supabase's 'never' is overridden by other types in this union type., I found a temporary fix using ESLint overrides:
// Supabase `'never' is overridden by other types in this union type.` tmp fixoverrides: [{files: ["src/lib/db_types.ts"],// Adjust this path to where your Supabase schema file is generatedrules: {"@typescript-eslint/no-redundant-type-constituents": "off",},},],
This solution disables the rule only for the generated file and prevents you from having to manually comment in the file every time it's regenerated. Hopefully, this can help while Supabase works on a permanent fix!
You can adjust the file path (src/lib/db_types.ts) as necessary before posting!
Bug report
Description:
I'm encountering an issue with the generated TypeScript types when using Supabase. For the past 4 days, the types generated by the command
supabase gen types typescript
are producing TypeScript errors such as'never' is overridden by other types in this union type.
as indicated by SonarLint (typescript:S6571
).Supabase and Environment Details:
^1.204.3
Error Details:
The error manifests in the generated file, specifically in union types where 'never' seems to be incorrectly set as the type.
Here’s a screenshot of the relevant section:
it's not an issue in 1 project No, its happening in 3 projects now, any idea ?
The text was updated successfully, but these errors were encountered: