Skip to content

thrift2flow doesn't handle non consecutive enums #85

@bocui2

Description

@bocui2

What is in thrift:

enum WorkflowStatus {
INACTIVE,
ACTIVE,
TEST,
SIMULATIONSCHEDULED = 10,
SIMULATIONACTIVE,
SIMULATIONINACTIVE
}

Output of thrift2flow:
export type WorkflowStatusType =
| "ACTIVE"
| "INACTIVE"
| "SIMULATIONACTIVE"
| "SIMULATIONINACTIVE"
| "SIMULATIONSCHEDULED"
| "TEST";
export const WorkflowStatusValueMap = {
ACTIVE: 1,
INACTIVE: 0,
SIMULATIONACTIVE: 4, <- expect this to be 11
SIMULATIONINACTIVE: 5, <- expect this to be 12
SIMULATIONSCHEDULED: 10,
TEST: 2
};

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