When it comes to Firebase apps, this will probably slow down your data fetching by hundreds of milliseconds, which, in many cases, is a lot for synchronized experiences developed with this type of database.
Just another developer trying to get his tests fast, his features to add value and his bloody code to compile! Lately I've been enjoying writing about the best way to release software!
I've yet to see a performance hit with it in production environments running on older mobile devices :)
When it comes to Firebase apps, this will probably slow down your data fetching by hundreds of milliseconds, which, in many cases, is a lot for synchronized experiences developed with this type of database.
Perhaps it would be faster to spread the typed object into a new object:
{...entity}
What problem are you trying to solve with that? Why not just put the object directly into firebase?