@7nohe/openapi-react-query-codegen
Advanced tools
@@ -28,2 +28,4 @@ import { type ImportDeclarationStructure, Project } from "ts-morph"; | ||
| * Build import structure for models. | ||
| * Emitted as a type-only import so generated code compiles under | ||
| * `verbatimModuleSyntax` (enabled by default in recent Vite templates). | ||
| */ | ||
@@ -30,0 +32,0 @@ export declare function buildModelImport(ctx: GenerationContext): ImportDeclarationStructure | null; |
@@ -46,10 +46,10 @@ import { IndentationText, NewLineKind, Project, QuoteKind, StructureKind, } from "ts-morph"; | ||
| { name: "useMutation" }, | ||
| { name: "UseQueryResult" }, | ||
| { name: "UseQueryOptions" }, | ||
| { name: "UseInfiniteQueryOptions" }, | ||
| { name: "UseSuspenseInfiniteQueryOptions" }, | ||
| { name: "UseMutationOptions" }, | ||
| { name: "UseMutationResult" }, | ||
| { name: "UseSuspenseQueryOptions" }, | ||
| { name: "InfiniteData" }, | ||
| { name: "UseQueryResult", isTypeOnly: true }, | ||
| { name: "UseQueryOptions", isTypeOnly: true }, | ||
| { name: "UseInfiniteQueryOptions", isTypeOnly: true }, | ||
| { name: "UseSuspenseInfiniteQueryOptions", isTypeOnly: true }, | ||
| { name: "UseMutationOptions", isTypeOnly: true }, | ||
| { name: "UseMutationResult", isTypeOnly: true }, | ||
| { name: "UseSuspenseQueryOptions", isTypeOnly: true }, | ||
| { name: "InfiniteData", isTypeOnly: true }, | ||
| { name: "FetchQueryOptions", isTypeOnly: true }, | ||
@@ -83,2 +83,4 @@ { name: "FetchInfiniteQueryOptions", isTypeOnly: true }, | ||
| * Build import structure for models. | ||
| * Emitted as a type-only import so generated code compiles under | ||
| * `verbatimModuleSyntax` (enabled by default in recent Vite templates). | ||
| */ | ||
@@ -92,2 +94,3 @@ export function buildModelImport(ctx) { | ||
| moduleSpecifier: "../requests/types.gen", | ||
| isTypeOnly: true, | ||
| namedImports: ctx.modelNames.map((name) => ({ name })), | ||
@@ -94,0 +97,0 @@ }; |
+1
-1
| { | ||
| "name": "@7nohe/openapi-react-query-codegen", | ||
| "version": "3.0.0", | ||
| "version": "3.0.1", | ||
| "description": "OpenAPI React Query Codegen", | ||
@@ -5,0 +5,0 @@ "bin": { |
106985
0.42%1820
0.17%