From 7a1facdbc6a019ee40403ce33e07eca35f8d0abb Mon Sep 17 00:00:00 2001 From: dalechyn Date: Sat, 9 Nov 2024 16:34:03 +0200 Subject: [PATCH] fix: double hook type mutation cli --- src/Cli/Commands/Generate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cli/Commands/Generate.ts b/src/Cli/Commands/Generate.ts index 0350f86..60926a4 100644 --- a/src/Cli/Commands/Generate.ts +++ b/src/Cli/Commands/Generate.ts @@ -139,7 +139,7 @@ export async function generate(options: Generate = {}) { : "import { useMutation } from '@tanstack/react-query'" } - export function ${outputHook}${hookType}({mutation = {}}${ + export function ${outputHook}({mutation = {}}${ isTypeScript ? `: { mutation?: MutationOptions | undefined @@ -168,7 +168,7 @@ export async function generate(options: Generate = {}) { return ['${namespaceName}.${functionName}', parameters] as const } - export function ${outputHook}${hookType}({query = {}, args}${ + export function ${outputHook}({query = {}, args}${ isTypeScript ? `: { query?: QueryOptions | undefined