• Returns a store, creates it if necessary.

    Parameters

    • Optionalpinia: Pinia

      Pinia instance to retrieve the store

    • Optionalhot: StoreGeneric

      dev only hot module replacement

    Returns Store<
        "profile",
        UserProfileState,
        {
            isCurrentUser: (
                state: { email: string; username: string } & PiniaCustomStateProperties<
                    UserProfileState,
                >,
            ) => (email: string) => boolean;
        },
        {
            addWatchedVideo(videoId: string): Promise<boolean>;
            getProfileInfo(): Promise<void>;
            setUsername(username: string): void;
            updateProfileInfo(username: string, bio: string): Promise<boolean>;
        },
    >

Properties

Properties

$id: "profile"

Id of the store. Used by map helpers.