upgreded to supabase v2, but can't see any types from my data?

Before v2, I would add a type next to the .from() method like this:
  const { data, error } = await supabase
    .from<ProductTypeHere>('products')

But now, it supposed to know the types automatically when initialize client like this:

import type { Database } from 'types_db';

export const supabase = createBrowserSupabaseClient<Database>();


But, as you can see from the picture, I get any[] | null as a return instead of my database type.

How can I get return types for my data?
Screenshot_2022-10-23_at_01.33.09.png
Was this page helpful?