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

feat(block-std): add try in command manager #4626

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

Flrande
Copy link
Member

@Flrande Flrande commented Sep 6, 2023

The try method provides a way to sequentially execute a list of commands until one of them succeeds. If a command fails (not run next), the next command in the list will be attempted. The chain will continue with subsequent commands only after one of the commands in the try list succeeds.

root.blockStore.commandManager
  .pipe()
  // if `commandB` execute `next` commandC will not run
  .try([commandA, commandB, commandC]).commandD()
  .run();

@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 8:43am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2023 8:43am

@Flrande Flrande merged commit 7124b7b into toeverything:master Sep 6, 2023
22 checks passed
@Flrande Flrande deleted the feat/command-run-0906 branch September 6, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notable Major improvement worth emphasizing
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants