Errors in Angular after updating to 2.0.0
I'm receiving the errors found in the attached screenshot, after updating the javascript client to 2.0.0.
I am using supabase with Angular 14
My 'supabase' service is quite basic:
import { Injectable } from '@angular/core';
import { createClient, SupabaseClient } from '@supabase/supabase-js';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
export class SupabaseService {
private supabase: SupabaseClient;
constructor() {
this.supabase = createClient(environment.supabaseURL, environment.supabaseKey);
this.supabase.auth.onAuthStateChange((event, session) => {
console.log('auth changed: ', event);
console.log('auth changed session: ', session)
});
}
get session() {
return this.supabase.auth.getSession()
}
signIn(email: string) {
return this.supabase.auth.signInWithOtp({
email: email
});
}
signOut() {
return this.supabase.auth.signOut();
}
}
I tried generating types with the CLI and using the Database type on the SupabaseClient generic constructor(e.g: SupabaseClient<Database>), but that did not work.
Is there anything I'm missing to change with this SupabaseClient type, after the update?
I am using supabase with Angular 14
My 'supabase' service is quite basic:
import { Injectable } from '@angular/core';
import { createClient, SupabaseClient } from '@supabase/supabase-js';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
export class SupabaseService {
private supabase: SupabaseClient;
constructor() {
this.supabase = createClient(environment.supabaseURL, environment.supabaseKey);
this.supabase.auth.onAuthStateChange((event, session) => {
console.log('auth changed: ', event);
console.log('auth changed session: ', session)
});
}
get session() {
return this.supabase.auth.getSession()
}
signIn(email: string) {
return this.supabase.auth.signInWithOtp({
email: email
});
}
signOut() {
return this.supabase.auth.signOut();
}
}
I tried generating types with the CLI and using the Database type on the SupabaseClient generic constructor(e.g: SupabaseClient<Database>), but that did not work.
Is there anything I'm missing to change with this SupabaseClient type, after the update?
