OpenAPI-Qraft / openapi-qraft

Generate a type-safe OpenAPI client for your React app
https://openapi-qraft.github.io/openapi-qraft/
MIT License
26 stars 3 forks source link

Enums are exported as types, cannot be used #108

Closed EcksDy closed 1 month ago

EcksDy commented 1 month ago

Enums inside schema.ts are exported correctly. But then inside of index.ts everything is exported as types:

export type * from "./schema";

This leads to the following error when trying to use the enums:

'SomeEnum' cannot be used as a value because it was exported using 'export type'. ts(1362)
radist2s commented 1 month ago

@EcksDy, thank you for the feedback, I'll fix it.

radist2s commented 1 month ago

@EcksDy, I've just released a new @openapi-qraft/cli@1.12.1-beta.0, could you please clarify if this works as intended?

EcksDy commented 1 month ago

Works as intended 🙏

radist2s commented 1 month ago

Fixed in @openapi-qraft/tanstack-query-react-plugin@1.12.1.