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: use ObjectLiteral in UpdateEvent rather than Entity #7910

Merged
merged 1 commit into from Jul 15, 2021

Conversation

imnotjames
Copy link
Contributor

@imnotjames imnotjames commented Jul 15, 2021

Description of change

The typing going into UpdateEvent.entity is always an ObjectLiteral, so update the typing on the UpdateEvent to match.

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

@imnotjames imnotjames merged commit 78fbc14 into typeorm:master Jul 15, 2021
@imnotjames imnotjames deleted the fix/update-event-typing branch July 15, 2021 13:07
@mathieu-bour
Copy link

mathieu-bour commented Jul 29, 2021

Could you explain possible:

The typing going into UpdateEvent.entity is always an ObjectLiteral

This modification wrecks a lot of my subscribers typings...

@imnotjames
Copy link
Contributor Author

imnotjames commented Jul 29, 2021

We never sent an entity into UpdateEvent. If it was close to your entity object then that was a coincidence.

It wasn't even always a Partial<Entity>. Every usage we had internally was an object literal.

@mathieu-bour
Copy link

Thank you very much for the clarification!

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