Skip to content

Support is operator for enums #9045

@artsiommiksiuk

Description

@artsiommiksiuk

Clear and concise description of the problem

While migrating from open api and several schemas, I found my self repeatedly writing pattern like

model A is Core.A;
model B is Core.B;

this is done as a remapping measure, to keep for a while backward compatible schemas.

but enums require to write this

enum C { ...Core.C };

which also doesn't take into account decorators of course.

So, having the same is operator would make this process more uniform.

enum C is Code.C;

Otherwise, I don't see other language constructs allow to do so. Aliases are not creating named entries in the OpenAPI document and not even reaching AST.

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions