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

Add YAML.visitAsync() #372

Merged
merged 1 commit into from
Mar 20, 2022
Merged

Add YAML.visitAsync() #372

merged 1 commit into from
Mar 20, 2022

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Mar 15, 2022

Fixes #362 by adding a utility function visitAsync(node, visitor): Promise<void>.

Its behaviour is the same as visit(), but it allows for visitor functions that return a promise which resolves to one of the control values.

A new function turned out to be necessary to allow keeping visit() synchronous when called with synchronous visitors.

@eemeli eemeli merged commit da89f63 into master Mar 20, 2022
@eemeli eemeli deleted the async-visitor branch March 20, 2022 07:49
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

Successfully merging this pull request may close these issues.

YAML.visit() should support async visitors
1 participant