Interface Provider<T, TSharer>

Shared value provider.

Can be used to create a Registrar instance.

Type Parameters

  • T

    Shared value type.

  • TSharer extends object = any

    Supported sharer component type.

Hierarchy

  • Provider

Properties

Methods

Properties

priority?: number

The default priority of the shared value.

Equals to 0 when absent or negative.

supply?: Supply

Shared value supply.

Stops value sharing once cut off.

New supply instance will be created when absent.

Methods

  • Provides shared value for the given component context.

    Returns

    Either a shared value, or its AfterEvent keeper.

    Type Parameters

    • TComponent extends object

      Actual sharer component type.

    Parameters

    • target: Target<T, TComponent>

      Shared value definition target.

    Returns T | AfterEvent<[T?]>

Generated using TypeDoc