function onLifecycleRegistered view code
onLifecycleRegistered(
listener: (lifecycle: Lifecycle<Args...>, callback: (Args...) -> ()
): () -> ()
Called when an object registers a lifecycle method. Listeners are expected to be infallible and non-yielding. The listener receives the callback.
Parameters
listener: (lifecycle: Lifecycle, callback: (Args...) -> ()
Called when any lifecycle registers a callback.
Returns
() -> ()
A callback that when called removes the listener.