Skip to content

Allow type generation of const enums #422

@schicks

Description

@schicks

In most of my codebase I avoid real typescript enums so that we can use constant strings interchangeably with the enum values. While the runtime values of zeus enums are the same as my constant strings, the fact that they are generated as an enum rather than a const enum (or just a ts union) means that I get type errors when I try to provide the underlying values to something typed from zeus generation.

I'd like to be able to configure zeus to generate const enums or string unions, similar to how you can with graphql let. I was not able to find evidence of this in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions