Skip to content

Conversation

huseeiin
Copy link
Contributor

@huseeiin huseeiin commented Aug 7, 2025

this hides props from the user that they should not use

@huseeiin huseeiin requested a review from pi0 as a code owner August 7, 2025 16:09
@huseeiin huseeiin changed the title fix(event): make res and res.headers private fix(event): make _res and res._headers private Aug 7, 2025
@pi0
Copy link
Member

pi0 commented Aug 7, 2025

Thanks for PR. It breaks tests since in response handler we need to access intermediate headers and avoid triggering slow path:

const eventHeaders = (event.res as { _headers?: Headers })._headers;

We could use ~ instead.

@pi0 pi0 changed the title fix(event): make _res and res._headers private refactor(event): make _res and res._headers private Aug 7, 2025
@pi0 pi0 changed the title refactor(event): make _res and res._headers private refactor(event): make _res and res._headers hidden Aug 7, 2025
@huseeiin
Copy link
Contributor Author

huseeiin commented Aug 7, 2025

Thanks for PR. It breaks tests since in response handler we need to access intermediate headers and avoid triggering slow path:

const eventHeaders = (event.res as { _headers?: Headers })._headers;

We could use ~ instead.

oh this line will error?

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