creditkarma / thrift-typescript

Generate TypeScript from Thrift IDL files
Apache License 2.0
155 stars 32 forks source link

feat: [WIP] add flag to render thrift unions as TypeScript unions #139

Closed kevin-greene-ck closed 5 years ago

kevin-greene-ck commented 5 years ago

New "strictUnions" option will render unions more strictly. As a TypeScript union of interfaces each with one required filed. This option removes the convenience class available to structs and exceptions, but allows for more accurate compile-time checks of the Thrift contract.

kevin-greene-ck commented 5 years ago

Closing this in favor of a different solution I'll post shortly.