Open lokhmakov opened 2 years ago
To fix this we should add support for TemplateLiteral
here:
https://github.com/statelyai/xstate-tools/blob/e938f4c7eed2b92bf480a03c2ec8458d9bdd95f9/packages/machine-extractor/src/actions.ts#L85-L100
We already have some logic to handle TemplateLiteral
s (see the helper here) but it's not used for the actions. For example, it's used for transition targets here. However, extracting actions might be a little bit more complex as the return value might be slightly more complex than just the extracted string so it's probably not a matter of just adding a TemplateLiteral
to the appropriate array.
As a quick fix one could just extend the referenced ActionAsString
to handle TemplateLiteral
s too.
Not really an issue for me, just trying to figure out why types don't work. Thanks.