xstate-tools icon indicating copy to clipboard operation
xstate-tools copied to clipboard

Extract name from functions/identifiers

Open kopiro opened this issue 2 years ago • 3 comments

Currently, when using function expressions or function variables in conditionals, the visualizer always shows 'Inline', even though these identifiers have a name that can be extracted.

image

kopiro avatar Jun 01 '23 09:06 kopiro

⚠️ No Changeset found

Latest commit: 674e40f537dd7272d48ca689bb845f913fb9aa10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 01 '23 09:06 changeset-bot[bot]

@mattpocock

kopiro avatar Jun 01 '23 10:06 kopiro

Thanks for the PR! I'm afraid though that we can't merge this right now. This could have unforeseen impact on some parts of the current system (an inline named function is not the same as string-named guard, like guard: 'isAdmin'). That being said, we plan to overhaul the extraction and vizualization parts and when doing so we'll address this issue.

Andarist avatar Jun 13 '23 12:06 Andarist