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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): add HttpContext bindings #80

Closed
wants to merge 1 commit into from
Closed

fix(types): add HttpContext bindings #80

wants to merge 1 commit into from

Conversation

RomainLanz
Copy link
Member

Hey there! 馃憢

This PR adds the missing typing for the HttpContext.

@thetutlage
Copy link
Member

We have it defined within the middleware file. https://github.com/adonisjs/session/blob/next/src/session_middleware.ts#L21-L25

This way the types and the runtime property are in sync. There won't be ctx.session (type + runtime property) if you do not have the middleware imported and registered

@RomainLanz
Copy link
Member Author

Closing since the issue was somewhere else.

You may end up in a weird situation when extending the HttpContext; this is the case here.
This should be fixed tomorrow by @thetutlage.

@RomainLanz RomainLanz closed this Sep 21, 2023
@RomainLanz RomainLanz deleted the fix/types branch September 21, 2023 17:34
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