UNPKG

@panyam/tsutils

Version:

Some basic TS utils for personal use

30 lines (29 loc) 730 B
export declare class URLBuilder { baseUrl: string; path: string; params: any; constructor(baseUrl: string); appendPath(path: string): this; addParam(key: string, value: string): this; addParams(params: any): this; build(): string; } export declare class Request { url: string; options: any; constructor(url: string, options: any); get method(): string; set method(method: string); get body(): any; set body(body: any); get headers(): any; get contentType(): string; } export declare class Response { status: number; statusText: string; headers: any; data: any; error: any; constructor(status?: number, statusText?: string, data?: any); }