Strangely, I don't recall ever seeing this question before.
From memory I don't recall such a trigger function existing.
Assuming I am right, you can simulate it.
Make a trigger that:
kills all units by player
gives vision of whole map by player
You could even make a custom UI through various ways depending on your wc3 version to toggle vision etc
I hope to be wrong on this because it is likely a lot of work if you want good observer functionality and a trigger action for it does not exist.