-
-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend/typing regression in v11 #1178
Comments
Can confirm issue persists on |
I think this d3b972e may be the culprit, but haven't tried your example yet. |
Here's a sample test that should work, yet fails with this regression (and should be added to the test suite). test('sends plain objects as JSON using extended client', withServer, async (t, server, got) => {
server.post('/', defaultEndpoint);
const extendedClient = got.extend({ responseType: 'json' })
const {body} = await extendedClient.post<{such: 'wow'}>({
json: {such: 'wow'}
});
t.deepEqual(body, {such: 'wow'});
}); I don't think the |
Just checked back to v10.7.0, this wasnt necessarily working as intended their either. It was using the |
This is actually a duplicate of #1117, closing. |
Actually this shouldn't error, sorry. |
Describe the bug
Actual behavior
With got 11.0.2, this file results in TypeScript compiler error:
The error is:
Expected behavior
With got 10.7.0, the code compiles fine.
Code to reproduce
See above.
Checklist
The text was updated successfully, but these errors were encountered: