Skip to content

Commit

Permalink
fix: adapt for @octokit/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Apr 19, 2020
1 parent d5f2696 commit 61c2d9a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/with-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export function withDefaults(
const DEFAULTS = merge(oldDefaults, newDefaults);
const endpoint = endpointWithDefaults.bind(null, DEFAULTS);

return Object.assign(endpoint, {
DEFAULTS,
defaults: withDefaults.bind(null, DEFAULTS),
merge: merge.bind(null, DEFAULTS),
parse,
});
return (
Object.assign(endpoint, {
DEFAULTS,
defaults: withDefaults.bind(null, DEFAULTS),
merge: merge.bind(null, DEFAULTS),
parse,
}) as EndpointInterface<typeof oldDefaults & typeof newDefaults>
);
}

0 comments on commit 61c2d9a

Please sign in to comment.