diff --git a/lib/index.ts b/lib/index.ts index 0dd7ceb..b8356de 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -251,8 +251,7 @@ export function type( 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({});