How can I cast the type of data from supabase response?

How can I cast the type of the tasks variable to an interface Task[]?
const { data: tasks, error: taskError } = await supabase
    .from("tasks")
    .select(
      `id, title, description, priority, due_by, is_completed, tags (title, id)`
    );
Was this page helpful?