Function cxBuildAsset

  • Creates context entry asset that builds value asset with the given builder function.

    Evaluates value asset at most once per context.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    • TContext extends CxValues = CxValues

      Supported context type.

    Parameters

    • entry: CxEntry<TValue, TAsset>

      Target context entry.

    • build: ((this, target) => undefined | null | TAsset)

      Asset builder function accepting entry definition target as its only parameter.

        • (this, target): undefined | null | TAsset
        • Parameters

          • this: void
          • target: Target<TValue, TAsset, TContext>

          Returns undefined | null | TAsset

    • Optional supply: Supply

      Asset supply. Removes the created asset once cut off.

    Returns CxAsset<TValue, TAsset, TContext>

    New context entry asset.

Generated using TypeDoc