Skip to content

function lifecycle view code

lifecycle(
    method: string, 
    onFire: (lifecycle: Lifecycle<Args...>, Args...) -> ()
): Lifecycle<Args...>

Constructs and returns a new lifecycle object. Providers with the specified method will be registered.

Parameters

method: string

The provider method that this lifecycle should hook onto.

onFire: (lifecycle: Lifecycle, Args...) -> ()

A method to fire the lifecycle method. It receives itself and the arguments passed to it.

Returns

Lifecycle

A freshly constructed lifecycle object.