Skip to content
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

Improve type system for get and head methods #87

Merged
merged 7 commits into from
Feb 22, 2019

Conversation

doniyor2109
Copy link
Contributor

@doniyor2109 doniyor2109 commented Jan 20, 2019

Fixes #85

Todo:

  • Do not allow the body option when using ky.get() and ky.head()
  • Do not allow the body option when using (…, {method: 'get', body: …})
  • Disallow the body option when the json option is used

@sholladay
Copy link
Collaborator

LGTM.

Feels a little verbose but I don't have any constructive suggestions.

@sindresorhus
Copy link
Owner

@doniyor2109 Can you add some type tests for the various cases? => https://github.com/sindresorhus/ky/blob/master/index.test-d.ts

index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

@szmarczak This is still missing the type tests I requested in #87 (comment).

@szmarczak
Copy link
Collaborator

Ok, I'll try to do it :)

@szmarczak
Copy link
Collaborator

@sindresorhus done

@sindresorhus sindresorhus merged commit 66ea8a7 into sindresorhus:master Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants