Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command.after seems to do nothing #362

Open
sugardave opened this issue Apr 4, 2024 · 0 comments
Open

command.after seems to do nothing #362

sugardave opened this issue Apr 4, 2024 · 0 comments

Comments

@sugardave
Copy link

I'm working on expanding the DefinitelyTyped Vorpal definitions for my project where I want to use modes and I hate squiggly lines in my IDE. And as part of that project, I've found that I want to remove a command from a mode that is already initialized but should now not be available conditionally based on another command in that mode.

From this:

mode ->
    commandA
    commandB

Running commandB --some-option should result in this:

mode ->
    commandB

Looking through the source I see there is command.after which I figured would be a fine place to do a find/remove shuffle. But, it seems that nothing happens when the command finishes. However, command.done is also available and that seems to fire and I am able to remove commandA.

I wonder if command.after is supposed to work or not to determine if I should bother adding it to the Vorpal types in DefinitelyTyped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant