diff --git a/src/createPrefetch.mts b/src/createPrefetch.mts index 0d4e0ed..9b01c16 100644 --- a/src/createPrefetch.mts +++ b/src/createPrefetch.mts @@ -4,8 +4,6 @@ import { BuildCommonTypeName, extractPropertiesFromObjectParam, getNameFromMethod, - queryKeyConstraint, - queryKeyGenericType, } from "./common.mjs"; import type { MethodDescription } from "./common.mjs"; import { @@ -55,8 +53,8 @@ function createPrefetchHook({ "queryClient", undefined, ts.factory.createTypeReferenceNode( - ts.factory.createIdentifier("QueryClient"), - ), + ts.factory.createIdentifier("QueryClient") + ) ), ...requestParams, ], @@ -82,14 +80,14 @@ function createPrefetchHook({ extractPropertiesFromObjectParam(param).map( (p) => ts.factory.createShorthandPropertyAssignment( - ts.factory.createIdentifier(p.name), - ), - ), - ), + ts.factory.createIdentifier(p.name) + ) + ) + ) ), ] - : [], - ), + : [] + ) ), ts.factory.createPropertyAssignment( ts.factory.createIdentifier("queryFn"), @@ -99,12 +97,12 @@ function createPrefetchHook({ [], undefined, ts.factory.createToken( - ts.SyntaxKind.EqualsGreaterThanToken, + ts.SyntaxKind.EqualsGreaterThanToken ), ts.factory.createCallExpression( ts.factory.createPropertyAccessExpression( ts.factory.createIdentifier(className), - ts.factory.createIdentifier(methodName), + ts.factory.createIdentifier(methodName) ), undefined, method.getParameters().length @@ -116,24 +114,24 @@ function createPrefetchHook({ extractPropertiesFromObjectParam(param).map( (p) => ts.factory.createShorthandPropertyAssignment( - ts.factory.createIdentifier(p.name), - ), - ), - ), + ts.factory.createIdentifier(p.name) + ) + ) + ) ), ] - : undefined, - ), - ), + : undefined + ) + ) ), ]), - ], - ), - ), + ] + ) + ) ), ], - ts.NodeFlags.Const, - ), + ts.NodeFlags.Const + ) ); return hookExport; }