Skip to content

Commit

Permalink
Fix mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
JAForbes committed Feb 29, 2024
1 parent 63a3da8 commit ecf37ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/index.ts
Expand Up @@ -251,8 +251,7 @@ export function type<N extends string, D extends Definition>(

for (const [tag, of] of Object.entries(routes)) {
api[tag] = (value:any = {}) => {
value.rest = normalizeRest(value.rest)
return { type, tag, value }
return { type, tag, value: { ...value, rest: normalizeRest(value.rest) } }
};

const res = of({});
Expand Down

0 comments on commit ecf37ca

Please sign in to comment.