Skip to content

Commit

Permalink
chore: Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
7nohe committed May 26, 2024
1 parent 7e6d53d commit b46eff7
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions src/createPrefetch.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {
BuildCommonTypeName,
extractPropertiesFromObjectParam,
getNameFromMethod,
queryKeyConstraint,
queryKeyGenericType,
} from "./common.mjs";
import type { MethodDescription } from "./common.mjs";
import {
Expand Down Expand Up @@ -55,8 +53,8 @@ function createPrefetchHook({
"queryClient",
undefined,
ts.factory.createTypeReferenceNode(
ts.factory.createIdentifier("QueryClient"),
),
ts.factory.createIdentifier("QueryClient")
)
),
...requestParams,
],
Expand All @@ -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"),
Expand All @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit b46eff7

Please sign in to comment.