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(typescript): Interaction.prototype.session structure #924

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

jstewmon
Copy link
Contributor

@jstewmon jstewmon commented Mar 2, 2021

Interaction.session is always a plain object - its type was changed to
a union type including Session when the Interaction constructor was
updated to handle payload.session being an instance of Session, but in
such a case, the Session object is transformed to a plain object.

The jti property appears to have been an extraneous duplicate of the
cookie property - a Session object's jti property is mapped to the
cookie property of the plain object.

The uid property was simply missing from the type definition.

Interaction.session is always a plain object - its type was changed to
a union type including Session when the Interaction constructor was
updated to handle payload.session being an instance of Session, but in
such a case, the Session object is transformed to a plain object.

The jti property appears to have been an extraneous duplicate of the
cookie property - a Session object's jti property is mapped to the
cookie property of the plain object.

The uid property was simply missing from the type definition.
@panva panva changed the title fix: align Interaction.session type definition with implementation fix(typescript): Interaction.prototype.session structure Mar 3, 2021
@panva panva merged commit 76c36c7 into panva:main Mar 3, 2021
@panva
Copy link
Owner

panva commented Mar 3, 2021

@jstewmon thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants