Skip to content
New issue

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

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

Already on GitHub? # to your account

Add sync mode #111

Closed
wants to merge 1 commit into from
Closed

Add sync mode #111

wants to merge 1 commit into from

Conversation

burashka
Copy link

@burashka burashka commented Mar 1, 2019

this.parse is sync method. This API doesn't need async. Please let me use it in sync.

@harttle
Copy link
Owner

harttle commented Mar 1, 2019

The render() is async and returns a promise, thus parseAndRender() will return a promise. Actually, it's intended to be async to embrace the JavaScript way, see: #3 and #5 .

By the way, we are planning to make scopes to be async too, see #65.

@burashka
Copy link
Author

burashka commented Mar 1, 2019

Ok, sorry

@burashka burashka closed this Mar 1, 2019
@burashka burashka deleted the patch-1 branch March 1, 2019 15:30
@harttle
Copy link
Owner

harttle commented Mar 1, 2019

Nothing to sorry about :) There's once a discussion over renderSync() method (#48). It could be possible to provide a sync version and throw an Error once async tags are called. It's a good point.

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

Successfully merging this pull request may close these issues.

2 participants