import type { Token } from "./Token.js"; export type Events = { signIn: CustomEvent signOut: Event refresh: CustomEvent }; export interface BaseOauthClient { (): Promise; getTokenOrUndefined: () => string | undefined; signIn: () => Promise; signOut: () => Promise; addEventListener: (type: T, listener: ((evt: Events[T]) => void) | null, options?: boolean | AddEventListenerOptions) => void; removeEventListener: (type: T, callback: ((evt: Events[T]) => void) | null, options?: EventListenerOptions | boolean) => void; }