svelte-firebase-state
Version:
Simplify Firebase integration in Svelte and SvelteKit with reactive state management for Firestore and Realtime Database.
18 lines (17 loc) • 498 B
TypeScript
import { type Auth, type User } from "firebase/auth";
import { WritableState } from "../WritableState.svelte.js";
type CurrentUserStateOptions = {
auth: Auth;
};
export declare class CurrentUserState {
private readonly auth;
private unsub?;
userState: WritableState<User | undefined | null>;
loading: boolean;
constructor({ auth }: CurrentUserStateOptions);
private start;
private stop;
private listen_user;
get data(): User | null | undefined;
}
export {};