UNPKG

@ewb/reach

Version:
27 lines (26 loc) 768 B
import { IReachOptions } from '../types'; interface ReachServiceOptions { csrf?: { cookie: string; }; options?: Partial<IReachOptions>; headers?: Headers; logout?: (response: Response) => void; } export declare class ReachService { private _url; private opts; private _socketIds; private _onLogout; constructor(_url: string, opts: ReachServiceOptions); get socketIds(): string[]; get url(): string; set onLogout(fn: ReachServiceOptions['logout']); headers(): Headers; options(): Partial<IReachOptions>; getCSRFHeaderToken(): null | [string, string]; logout(response: Response): void; addSocket(id: string): void; deleteSocket(id: string): void; } export {};