thrift-typescript
thrift-typescript copied to clipboard
Version 4 in development
We've begun work on the next major release of the code generator, focusing on the thrift-server target. Some of the new features that will be arriving in some form in the next release are:
BigIntsupport (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). This will become the default render target ofi64. It's unclear if we will keep theInt64option. This will require a lot of changes to the corethrift-serverlibrary and not sure if we will want to maintain both code paths. This update would require consumers to be on Node >= 10.4.- Increased visibility into service payload processing. The first step here is expanding the metadata available on service objects as represented by #154, which gives service objects access to annotations defined on all method argument types. Service processors will also be expanded to have methods for introspecting payloads without running the payload through user-defined service handlers.
- All
Codecobjects will be renamed toToolkitand be expanded with more utilities, including the ability to read/write fromBufferinstead of justTProtocol. Another possibility being explored is removing generatedclassrepresentations of struct, union and exception and moving generated metadata, including annotations, to theseToolkitobjects. strictUnionswill likely become the default behavior, though the option for generating unions as structs with optional fields will probably remain.- The thrift-server core library is being simplified and more of the default behavior is being moved to generated code. This will make the generated code less dependent on the core library allowing more features and fixes to happen in a more seamless fashion.
- The generated code may be updated to use
Uint8Arrayinstead ofBufferto allow developing of clients for web browsers and other non-Node JavaScript environments. - The
Contextobject is going to become more opinionated. TheContextis going to be populated with a sub-set of the incoming request properties and users will be given an opportunity to decorate this object with more properties/methods beyond the defaults. - The
__namefield will be added to all strict interfaces by default, can be optionally removed.
We are looking at a release window of June-July for these features. There will be prereleases along the way with corresponding prereleases of thrift-server.