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

Binding to Promise.allSettled #5923

Closed
cometkim opened this issue Jan 2, 2023 · 0 comments
Closed

Binding to Promise.allSettled #5923

cometkim opened this issue Jan 2, 2023 · 0 comments

Comments

@cometkim
Copy link
Member

cometkim commented Jan 2, 2023

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled

type PromiseSettlementResult<V, R> = (
  | PromiseFulfilledResult<V>
  | PromiseRejectedResult<R>
);

type PromiseFulfilledResult<V> = {
  status: 'fulfilled',
  value: V,
};

type PromiseRejectedResult<R> = {
  status: 'rejected',
  reason: R,
}

The return type of that API is a tagged object. In order to add bindings without runtime, the previous issue need to be resolved first.

cometkim added a commit to cometkim/rescript that referenced this issue Apr 12, 2023
cometkim added a commit to cometkim/rescript that referenced this issue Apr 12, 2023
cometkim added a commit to cometkim/rescript that referenced this issue Apr 20, 2023
@cometkim cometkim closed this as completed Sep 9, 2024
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 a pull request may close this issue.

1 participant