creditkarma / thrift-typescript

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

Can't use enums from other files in map constants #173

Open hayes opened 5 years ago

hayes commented 5 years ago

The following produces an error, but should be valid:

keys.thrift

namespace js example
enum Keys {
  foo = 1,
  bar = 2,
}

map.thrift

namespace js example
include './keys.thrift'

const map<keys.Keys, string>  MyMap = {
  keys.Keys.foo: "foo",
  keys.Keys.bar: "bar",
}

Error: Unable to resolve value of identifier[keys.Keys.foo]

hc-danieltiziani commented 4 years ago

Any change to get this PR merged? I'm facing the same issue here:

(node:88856) UnhandledPromiseRejectionWarning: Error: Unable to resolve identifier[FeeType] in xxx/xxx/xxx
thonythony commented 3 years ago

Same problem here, why this PR is not yet merged after two years ?

hayes commented 3 years ago

🤷 I know a couple of other small things got addressed since I put this up, but the repo has been pretty in-active for a while. We ended up creating a fork at Airbnb since there were several issues we couldn't get any progress on (I don't work there anymore).

niodice commented 1 year ago

Also curious about the feasibility of merging this in.