Skip to content

Commit 4799f80

Browse files
committed
chore: modify type import
1 parent 3ce62ba commit 4799f80

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/typescript/src/templates/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const getContext = (
1212
type QueryKey,
1313
type UseQueryOptions,
1414
} from "@tanstack/react-query";
15-
import ${useTypeImports ? "{ type QueryOperation }" : "{ QueryOperation }"} from './${componentsFile}';
15+
import ${useTypeImports ? "type { QueryOperation }" : "{ QueryOperation }"} from './${componentsFile}';
1616
1717
export type ${pascal(prefix)}Context<
1818
TQueryFnData = unknown,

plugins/typescript/src/templates/fetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const getFetcher = ({
1818
}) =>
1919
`${
2020
contextPath
21-
? `import ${useTypeImports ? `{ type ${pascal(prefix)}Context }` : `{ ${pascal(prefix)}Context }`} from "./${contextPath}";`
21+
? `import ${useTypeImports ? `type { ${pascal(prefix)}Context }` : `{ ${pascal(prefix)}Context }`} from "./${contextPath}";`
2222
: `export type ${pascal(prefix)}FetcherExtraProps = {
2323
/**
2424
* You can add some extra props to your generated fetchers.

0 commit comments

Comments
 (0)