Skip to content

@fkn/lib/account

type AccountInfo = object;
image: string | null;

profile image URL, or null if none is set

name: string;

the account’s display name (a username, not necessarily a real name)

premium: boolean;

the account has an active paid subscription

premiumUntil: number | null;

when the current subscription lapses, as a ms epoch, or null when not subscribed

function info(): Promise<AccountInfo | null>;

Promise<AccountInfo | null>


function login(): Promise<boolean>;

Promise<boolean>


function logout(): Promise<void>;

Promise<void>


function onChange(callback): Promise<() => void>;

() => void

Promise<() => void>