Why?
There is no "declaring" anywhere in the rules. You Ready a spell as per the rules, cast it as normal and then release the energy in response to the trigger. It is pretty simple.
You are not casting the spell in response to the trigger (you are casting it whether or not it happens), you...