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

thrift2flow doesn't handle non consecutive enums #85

Open
bocui2 opened this issue Jun 1, 2019 · 0 comments
Open

thrift2flow doesn't handle non consecutive enums #85

bocui2 opened this issue Jun 1, 2019 · 0 comments

Comments

@bocui2
Copy link

bocui2 commented Jun 1, 2019

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
};

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