Add types for lifecycle events.

Must we have a type? Can we just decree that exactly one of the below things should be specified or it's invalid?