// @ts-nocheck
import { useSession } from '$useSession';
/**
 * Provides the current user id or throws an error if the user is not authenticated
 */
export function useUserIdOrThrow() {
    const { userId } = useSession();
    if (!userId) {
        throw new Error('User not authenticated');
    }
    return userId;
}
//# sourceMappingURL=use-user-id-or-throw.js.map