In my opinion it should be heal first. That's much less speculative and very consistent with the descriptions from dissi and BlackLotus.
To clarify the steps which are happening in the chosen pull/15:
collect all damages and heals
check for death
apply damage
drop carry if damaged
apply heal
cap max health
So now it's damage first without death check. So effectively a creep can have -10k health after receiving damage and be healed back to max hp with 15k in the same tick, giving every healer the Defend skill of a power creep, making that skill obselete. That is called 'overhealing' in this post.That also means, that healers must guess which creep will receive damage to give the intent to heal such damage before it happens.Boosted tough-parts will only be effective when they're always healed before knowing the damage.Fights with boosted creeps will be a gamble.If it stays like that, I just see one inconsistency: After step 3, there is no death check, but there is a carry-check.I guess the check for `'./creeps/_drop-resources-without-space'` should be done after the healing. Because If death is delayed then the drop of resources should also be delayed.I'm also a little confused why the check for death is step 2.
However, I see another way of a more consistent overhealing:
collect all damages and heals
apply heals (without cap --> 'overhealing')
apply damage
drop carry if damaged
cap max health
check for death
This allows overhealing, but doesn't revive dead creeps. It gives boosted tough parts their strength back, because you'll know exactly how much you need to heal in order to use the boosted tough parts.
Kind regards,Xenofix