Use KyRequest and KyResponse types in errors (#610)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* feat: additional json convenience methods - introduces `KyRequest` which, like `KyResponse`, adds `json()` convenience method for extracting JSON with an expected TypeScript type - update API `Request`/`Response` usages to expose `KyRequest`/`KyResponse` to `ky` consumers so that they may use the `json()` convenience method in more scenarios (`HTTPError`, `TimeoutError`, and hooks) Refs: #584 * fix unnecessary assertion * docs(readme): mention `.json()` TS improvements
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+19 added−9 removed
- tests:+1 added−1 removed
- other:+18 added−8 removed