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

fix: Fix coercion of i64 keys in map #133

Merged
merged 1 commit into from Nov 25, 2018

Conversation

hayes
Copy link
Contributor

@hayes hayes commented Nov 20, 2018

This adds coercion for map keys when initializing a struct (for thrift-server).

Previously thrift files which defined a struct containing a map who's keys are i64s would generate invalid typescript. The args would contain a map with keys of type number | thrift.Int64, and would attempt to set values on a Map<thrift.Int64, {valueType}>.

Having object keys in maps for a scalar type is not ideal, but I think this fix is a good interim solution. In the long run it would be awesome if i64s could be represented as BigInts now that they are supported in typescript and an LTS version of node.

@kevin-greene-ck
Copy link
Contributor

Thanks @hayes these are much appreciated. We definitely have BigInts in our future plans.

@kevin-greene-ck kevin-greene-ck merged commit 21d56b0 into creditkarma:master Nov 25, 2018
@kevin-greene-ck
Copy link
Contributor

@hayes Both of your PRs are released in 3.0.2

@hayes
Copy link
Contributor Author

hayes commented Nov 30, 2018

thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants