Add types for lifecycle events.

done.