-
-
Notifications
You must be signed in to change notification settings - Fork 341
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 docs for ky.stop
#314
Conversation
index.d.ts should be in sync with the readme. |
I would also suggest to change tabs in code snippets in readme to spaces, because they are pretty hard to read with many levels of nesting, considering how wide tabs on github are. Maybe in a different PR though |
No thanks :) |
Fixes #290. I would also like to add
console.warn
in shortcut methods, such as.json()
and.text()
that would display a warning when ky.stop is returned and these methods are used. Maybe a lazy solution to check if thisresult
is notundefined
could work:ky/index.js
Line 338 in d976029
I can definitely add a check that it's not
undefined
to prevent those from throwingTypeError
and to make them silently returnundefined
instead. The question is: is it guaranteed that ifresult
isundefined
, this was caused byky.stop
? If yes, I could also addconsole.warn
in the same place where this check forresult !== undefined
is performed.