thrift-typescript doesn't accept maps with the key-value pairs not separated with a comma
Opened this issue · 1 comments
Aurora12 commented
We have a map definition with newlines for delimiters and thrift-typescript doesn't like that.
const map<i32,string> DATA_TYPE = {
-4: 'Notice'
-1: 'BackendException'
1: 'GetConnectionId'
2: 'ResolveCountry'
// ...etc
}
Parse Error:
Message: Closing brace missing from map definition
1093 | const map<i32,string> DATA_TYPE = {
^
We are using thrift generators for several languages–Scala, Kotlin, Swift, ObjectiveC–and all of them are perfectly fine with newlines instead of commas. So, I presume, this should be the standard behaviour.
This is probably a minor issue, given that it's easily fixed by adding commas, but so you know.
hayes commented
Pretty sure this would be an issue with the parser, which is in a separate repo: https://github.com/creditkarma/thrift-parser