supabase v2 fails to retrieve type definitions

I am trying to get some data from my products collection, but the return type is:
const data: any[] | null

instead of the type that I gave in my Database type, why is that?

here is the code:

import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();

export const getActiveProductsWithPrices = async (): Promise<
  ProductWithPrice[]
> => {
  const { data, error } = await supabase
    .from('products')
    .select('*, prices(*)')


Can someone please confirm, that this is a bug?
Was this page helpful?