Interface Placer<TValue, TAsset, TContext>

Context entry asset placer.

Places assets for the value of specific context entry.

Type Parameters

  • TValue

    Context value type.

  • TAsset = TValue

    Context value asset type.

  • TContext extends CxValues = CxValues

    Context type.

Hierarchy

  • Base<TValue, TAsset, TContext>
    • Placer

Properties

buildAsset?: undefined
entry: CxEntry<TValue, TAsset>

Target context entry.

supply?: Supply

Asset supply.

Removes the asset once cut off.

Returned from provide when specified. New one created when omitted.

Methods

  • Evaluates value asset or multiple assets and places them to target context entry.

    Passes each evaluated asset to the given collector, until the latter returns false or there are no more assets to place.

    This method is called each time value assets requested.

    Parameters

    • target: Target<TValue, TAsset, TContext>

      Context entry definition target.

    • collector: Collector<TAsset>

      Assets collector to place assets to.

    Returns void

  • Sets up asset.

    This method is called immediately when asset provided.

    It can be used e.g. to provide additional assets. Additional assets will be revoked when the asset itself revoked.

    Parameters

    • target: Target<TValue, TAsset, TContext>

      Context entry definition target.

    Returns void

Generated using TypeDoc