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

fix(typedResponse): bind remaining Proxy methods to Response #47

Merged
merged 1 commit into from
Jan 30, 2024
Merged

fix(typedResponse): bind remaining Proxy methods to Response #47

merged 1 commit into from
Jan 30, 2024

Conversation

iamandrewluca
Copy link
Contributor

@iamandrewluca iamandrewluca commented Jan 29, 2024

Please note the important detail in the get trap, in the line (*):
Why do we need a function to call value.bind(target)?
The reason is that object methods, such as user.checkPassword(), must be able to access _password:
https://javascript.info/proxy

Closes #46

Copy link
Owner

@gustavoguichard gustavoguichard left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you for the collaboration ❤️🙏🏽

@gustavoguichard gustavoguichard merged commit 316c019 into gustavoguichard:main Jan 30, 2024
1 check passed
@iamandrewluca iamandrewluca deleted the fix/bind-response-methods branch January 30, 2024 10:35
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.

Calling res.blob() or res.arrayBuffer() never ends.
2 participants