I am attempting to incorporate Supabase typescript types into my Next.js project, however, I encounter the error
Expected 0 type arguments, but received 1.
I'm following the instructions outlined in this documentation. Although I've successfully generated the types, I'm unable to implement them in my application.
Whenever I try to utilize the following code:
import { createClient } from "@/utils/supabase/server";
import { Database } from "@/types/supabase";
export async function myFunction() {
const supabase = createClient<Database>();
}
The <Database>
component triggers this error message:
Expected 0 type arguments, but received 1.
. If I remove <Database>
, the error disappears, but I lose the benefits of type safety.