Components bootstrap context.

An instance of this class is passed to init method so that the feature can configure itself.

Extends BootstrapValues interface. The values could be pre-configured in feature definitions.

Hierarchy

  • CxValues
    • BootstrapContext

Properties

Methods

Properties

whenReady: OnEvent<[BootstrapContext]>

An OnEvent sender of bootstrap readiness event.

The registered receiver will be notified once bootstrap is complete.

If bootstrap is complete already, the receiver will be notified immediately.

Methods

  • Obtains value of the given context entry.

    Returns

    Either context entry value, or a fallback one.

    Type Parameters

    • TValue

      Requested context value type.

    Parameters

    • entry: CxEntry<TValue, unknown>

      Context entry to obtain the value of.

    • Optional request: WithoutFallback<TValue>

      Context value request with fallback specified.

    Returns TValue

  • Obtains value of the given context entry, or returns a non-nullable fallback.

    Returns

    Either context entry value, or a fallback one.

    Type Parameters

    • TValue

      Requested context value type.

    Parameters

    • entry: CxEntry<TValue, unknown>

      Context entry to obtain the value of.

    • request: WithFallback<TValue>

      Context value request with fallback specified.

    Returns TValue

  • Obtains value of the given context entry, or returns a nullable fallback.

    Returns

    Either context entry value, or a fallback one.

    Throws

    CxReferenceError - If the target entry has no value and fallback one is not provided.

    Type Parameters

    • TValue

      Requested context value type.

    Parameters

    • entry: CxEntry<TValue, unknown>

      Context entry to obtain the value of.

    • Optional request: CxRequest<TValue>

      Context value request.

    Returns null | TValue

  • Allows to loads the given feature.

    Returns

    Loaded feature reference.

    Parameters

    • feature: Class<any>

      The feature to load.

    • Optional user: SupplyPeer

      The user of the feature. The feature reference will be dismissed once the user's supply is cut off.

    Returns FeatureRef

Generated using TypeDoc