import superjson from "superjson"; export type OutputType = { connected: false }; export async function postSpotifyLogout(): Promise { const result = await fetch("/_api/spotify-logout", { method: "POST" }); if (!result.ok) { const parsed = superjson.parse<{ error: string }>(await result.text()); throw new Error(parsed.error); } return superjson.parse(await result.text()); }