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

Overload result type of Object::get() #839

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Conversation

dherman
Copy link
Collaborator

@dherman dherman commented Dec 31, 2021

This PR changes the Object::get() API to return an overloaded result type V: Value instead of JsValue, and automatically performs the downcasting on behalf of the caller. Since it's already a fallible API, this should generally end up being more concise and ergonomic.

This is a backwards-incompatible change, however, and will require migration notes if we decide to go through with it.

(Replaces #795)

@dherman dherman changed the base branch from main to next/0.10 December 31, 2021 19:23
@kjvalencik
Copy link
Member

Looks great!

@dherman dherman merged commit 3f801c4 into next/0.10 Jan 14, 2022
@dherman dherman deleted the overload-object-get branch January 14, 2022 17:41
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.

2 participants