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

way to express type transformation of callWhen in Exo behavior #7110

Open
turadg opened this issue Mar 3, 2023 · 2 comments
Open

way to express type transformation of callWhen in Exo behavior #7110

turadg opened this issue Mar 3, 2023 · 2 comments
Labels
code-style defensive correctness patterns; readability thru consistency devex developer experience enhancement New feature or request technical-debt vaults_triage DO NOT USE

Comments

@turadg
Copy link
Member

turadg commented Mar 3, 2023

What is the Problem Being Solved?

The problem is that type defs with callWhen are deceptive. We have several "xxx" to suppress.

Basically #6160 (comment)

This is separated because that issue is about auto-generation from the shapes and this is a precursor: a manual way to express the function signature that is let's the Exo API and the implementation resolve amicably.

Description of the Design

Probably something in the Exo behavior map that finds callWhen in the guard and transforms the API type to be a promise with awaited arguments. Must inspect the arguments to only wrap Awaited on the M.awaited() ones.

Security Considerations

Scaling Considerations

Test Plan

@turadg turadg added enhancement New feature or request code-style defensive correctness patterns; readability thru consistency technical-debt devex developer experience labels Mar 3, 2023
@erights
Copy link
Member

erights commented Mar 3, 2023

But only for the M.awaited arguments, right? Other argument positions should not be transformed.

Oh, also the return result. But the return transformation should be the same as for async functions in general?

@turadg
Copy link
Member Author

turadg commented Mar 4, 2023

But only for the M.awaited arguments, right? Other argument positions should not be transformed.

Good point. I wrote it as if the callWhen would await all its arguments but it only does the M.awaited() ones. I'll update the body.

also the return result. But the return transformation should be the same as for async functions in general?

👍

@ivanlei ivanlei added the vaults_triage DO NOT USE label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-style defensive correctness patterns; readability thru consistency devex developer experience enhancement New feature or request technical-debt vaults_triage DO NOT USE
Projects
None yet
Development

No branches or pull requests

3 participants