Fix method options

This commit is contained in:
Wessel T
2019-04-24 00:34:55 +02:00
committed by GitHub
parent 8438961816
commit ab1350e15b

11
index.d.ts vendored
View File

@@ -106,8 +106,17 @@ declare namespace w {
chaining?: boolean;
parse?: 'json' | 'buffer' | 'form';
}
export interface MethodOptions {
url?: string;
method?: URLMethods;
data?: NormalObject;
headers?: KVObject;
chaining?: boolean;
parse?: 'json' | 'buffer' | 'form';
}
}
declare function w(url: string | w.URLOptions, method?: w.URLMethods | w.URLOptions): w.WumpRequest;
declare function w(url: string | w.URLOptions, method?: w.URLMethods | w.MethodOptions): w.WumpRequest;
export = w;