UNPKG

yg-tools

Version:

some convenient APIs and Methods for Youngon

24 lines (23 loc) 809 B
import type { APIContext, HttpRequestOption, HttpResponseOption, HttpResponseOptionWrapper } from '../types'; export default class WebContext { constructor(options?: Partial<APIContext>); static createWebContext(options?: Partial<APIContext>): WebContext; private obj2query; request(options: HttpRequestOption): Promise<HttpResponseOptionWrapper<HttpResponseOption>>; showToast(options: { title: string; icon: 'none'; duration: number; location?: 'top' | 'bottom' | 'middle'; }): void; login(): { code: number; }; switchTab({ url }: { url: string; }): void; getStorageSync(key: string): any; setStorageSync(key: string, value: any): void; removeStorageSync(key: string): void; clearStorageSync(): void; }