Skip to content

Converts Thrift specs into Flow JavaScript type definitions

License

Notifications You must be signed in to change notification settings

saminzadeh/thrift2flow

 
 

Repository files navigation

thrift2flow

Build status

Automagically converts Apache Thrift specs to Flowtype type definition files!

Example:

typedef string UUID

struct Customer {
  1: UUID id
  2: string name
  3: i32 age
  4: list<string> tags
}

Output:

export type UUID = string;

export type Customer = {
  id: UUID,
  name: string,
  age: number,
  tags: string[],
};

Installation and Usage

npm install -g thrift2flow
thrift2flow my/service.thrift

Contributing

We'd love for you to contribute to this project. Before we can accept your contributions, we kindly ask you to sign our Uber Contributor License Agreement.

  • If you find a bug, please open an issue, or submit a fix via a pull request
  • If you have a feature request, open an issue, or submit an implementation via a pull request
  • If you want to contribute, submit a pull request

Thanks!

About

Converts Thrift specs into Flow JavaScript type definitions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.7%
  • Thrift 8.0%
  • Dockerfile 0.3%