Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--runtime-enums flag seems to be broken #202

Open
araguma opened this issue Sep 17, 2024 · 0 comments
Open

--runtime-enums flag seems to be broken #202

araguma opened this issue Sep 17, 2024 · 0 comments

Comments

@araguma
Copy link

araguma commented Sep 17, 2024

I created an enum in Postgres using create type "Schema"."ClaimTypeEnum" as enum ('Institutional', 'Professional')

and referenced it in Kysely with sql.id('Schema', 'ClaimTypeEnum')

but when I run npx kysely-codegen --runtime-enums, I get

export interface Table {
    ClaimType: "Institutional" | "Professional";
}

instead of something like

export enum ClaimTypeEnum {
    INSTITUTIONAL = 'Institutional',
    PROFESSIONAL = 'Professional',
}
export interface Table {
    ClaimType: ClaimTypeEnum
}

For context, I'm using Postgres 16.4, and kysely-codegen 0.16.8.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant