Skip to content

Commit

Permalink
fix: make wrapFetch options optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jd1378 committed May 23, 2022
1 parent 7a35a20 commit 215f20a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v4.1.4

fix: make wrapFetch options optional

## v4.1.3

fix: make wrapFetch return type match global fetch
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
Cookie,
CookieJar,
wrapFetch,
} from "https://deno.land/x/[email protected].3/mod.ts";
} from "https://deno.land/x/[email protected].4/mod.ts";
```

### wrapFetch
Expand Down
2 changes: 1 addition & 1 deletion fetch_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type WrapFetchOptions = {

type FetchParameters = Parameters<typeof fetch>;

export function wrapFetch(options: WrapFetchOptions): typeof fetch {
export function wrapFetch(options?: WrapFetchOptions): typeof fetch {
const { cookieJar = new CookieJar(), fetch = globalThis.fetch } = options ||
{};

Expand Down

0 comments on commit 215f20a

Please sign in to comment.