Skip to content

"Jump to definition" doesn't work with v5's setup(...) API #479

@HerbCaudill

Description

@HerbCaudill

This feature advertised on the extension README doesn't seem to work with APIs recommended for setup in v5. My state machine is instantiated like this

const machine = setup({
  types: { ... },
  actions: { ... },
  guards: { ... })
.createMachine({
  context: { ... },
  // ... state machine definition
})

As far as I can tell:

  • I can command-click on some (but not all) target states and it'll jump to the correct state definition. It seems to work when the target states are at the root level, or when they're linked via id like #disconnected.
  • I can't jump to the definitions of any actions or guards. Which is weird because they all show up in intellisense, so the extension knows they exist.

In this screen capture, everywhere I click is a command-click, so should jump to definition if one is available.

Screen.Recording.2024-03-05.at.7.33.55.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions