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

Evaluations can be promises and those should not be resolved #67

Closed
borkdude opened this issue Oct 2, 2021 · 0 comments
Closed

Evaluations can be promises and those should not be resolved #67

borkdude opened this issue Oct 2, 2021 · 0 comments

Comments

@borkdude
Copy link
Collaborator

borkdude commented Oct 2, 2021

e.g.

(Promise.resolve 1)

should return that promise but when you evaluate it, the result via the API is a promise with the result and then the returned promise is in turn resolved. This is JS behavior: nested promises are flattened. I.e. Promise<Promise<T>> cannot exist.

microsoft/TypeScript#27711

As such we should wrap evaluation results.

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