Generated `specialized` field is not compatible with typescript strict mode
berekuk opened this issue · 4 comments
berekuk commented
From #11 (comment):
I believe there is currently nothing in the generated output that would require a type declaration, so you should be able to just treat it as typescript.
This seems to have changed at some point.
My generated parser includes this code:
specialized: [{term: 102, get: value => spec_identifier[value] || -1}],
Which is not compatible with Typescript strict mode or "noImplicitAny": true
:
marijnh commented
Does attached patch look like it would work for you?
berekuk commented
I think in my case the code was generated by a different branch that you need to update too, line 493 after your patch. (I see || -1
on the screenshot, not << 1
).
marijnh commented
Oh, good point. Added another patch that makes the change there as well.
berekuk commented
Looks good now!