posva / mande

<700 bytes convenient and modern wrapper around fetch with smart extensible defaults
https://mande.esm.is
MIT License
1.19k stars 42 forks source link

Invalid response type #324

Closed localhost5001 closed 2 years ago

localhost5001 commented 2 years ago

Consider the following code:

import { mande } from 'mande'
const api = mande('baseUrl');
const response = api.get('1');

In this case response will be Promise<Response>, but it should be Promise<any> if no type specified since responseAs is json by default.

Correct me if I am wrong.

Typescript version: 4.6.4 Mande version: 2.0.1

image