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

Make promise a built-in type. #5650

Merged
merged 4 commits into from Sep 9, 2022
Merged

Make promise a built-in type. #5650

merged 4 commits into from Sep 9, 2022

Conversation

cristianoc
Copy link
Collaborator

Cleaner on hover and writing promise types explicitly.

Cleaner on hover and writing promise types explicitly.
@cristianoc cristianoc merged commit 6e106e9 into master Sep 9, 2022
@cristianoc cristianoc deleted the builtin_promise branch September 9, 2022 06:45
let rec extractPromise t =
match t.desc with
| Tconstr
(Pdot (Pdot (Pident { name = "Js" }, "Promise", _), "t", _), [ t1 ], _)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be made opt-in? If this is a built in type, I remember there're some faster check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove Js.Promise.t from js_promise.ml but that's a breaking change.
So as long as you can use it explicitly, it's easy to unintentionally disable the check.
Probably something to remove a little later when the feature is less experimental.

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.

None yet

2 participants