This commit is contained in:
33
node_modules/licia/fetch.d.ts
generated
vendored
Normal file
33
node_modules/licia/fetch.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import has = require('./has');
|
||||
import types = require('./types');
|
||||
|
||||
declare namespace fetch {
|
||||
interface IResult {
|
||||
ok: boolean;
|
||||
status: number;
|
||||
statusText: string;
|
||||
url: string;
|
||||
clone(): IResult;
|
||||
text(): Promise<string>;
|
||||
json(): Promise<any>;
|
||||
xml(): Promise<Document | null>;
|
||||
blob(): Promise<Blob>;
|
||||
headers: {
|
||||
keys(): string[];
|
||||
entries(): Array<string[]>;
|
||||
get(name: string): string;
|
||||
has(name: string): boolean;
|
||||
};
|
||||
}
|
||||
}
|
||||
declare function fetch(
|
||||
url: string,
|
||||
options?: {
|
||||
method?: string;
|
||||
timeout?: number;
|
||||
headers?: types.PlainObj<string>;
|
||||
body?: any;
|
||||
}
|
||||
): Promise<fetch.IResult>;
|
||||
|
||||
export = fetch;
|
||||
Reference in New Issue
Block a user