mirror of
https://github.com/Wessel/wumpfetch.git
synced 2026-06-06 07:35:42 +02:00
14
__test__/wumpfetch-tests.ts
Normal file
14
__test__/wumpfetch-tests.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import w from '../index';
|
||||
|
||||
interface Yeetus
|
||||
{
|
||||
yes: boolean;
|
||||
}
|
||||
|
||||
(async() => {
|
||||
const res = await w('https://myurl.org', { method: 'GET' }).send();
|
||||
const res1 = await w('https://myurl.org', { method: 'GET', chaining: false });
|
||||
|
||||
const d = res.json<Yeetus>();
|
||||
const d1 = res.json();
|
||||
})();
|
||||
2
index.d.ts
vendored
2
index.d.ts
vendored
@@ -103,7 +103,7 @@ declare namespace w {
|
||||
method: URLMethods;
|
||||
data?: NormalObject;
|
||||
headers?: KVObject;
|
||||
chain?: boolean;
|
||||
chaining?: boolean;
|
||||
parse?: 'json' | 'buffer' | 'form';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user