Interface CxValues

The values available in context, identified by their entries.

Hierarchy

Methods

Methods

  • Obtains value of the given context entry.

    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

    Either context entry value, or a fallback one.

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

    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

    Either context entry value, or a fallback one.

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

    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

    Either context entry value, or a fallback one.

Generated using TypeDoc