Function cxDynamic

  • Creates potentially empty array-valued context entry definer that treats all entry assets as entry value.

    The entry value updated each time an asset provided or revoked.

    Type Parameters

    • TElement

      Array element type. The same as entry value asset type.

    Returns Definer<readonly TElement[], TElement>

    New context entry definer.

  • Creates array-valued context entry definer that treats all entry assets as entry value.

    The entry value updated each time an asset provided or revoked.

    Type Parameters

    • TElement

      Array element type. The same as entry value asset type.

    Parameters

    • byDefault: {
          assign?: undefined;
          byDefault?: ((this, target) => readonly TElement[]);
          create?: undefined;
      }

      Creates entry value used when there are no assets. The default value evaluated at most once per context.

      • Optional assign?: undefined
      • Optional byDefault?: ((this, target) => readonly TElement[])
          • (this, target): readonly TElement[]
          • Parameters

            Returns readonly TElement[]

      • Optional create?: undefined

    Returns Definer<readonly TElement[], TElement>

    New context entry definer.

  • Creates single-valued context entry definer based on entry asset list.

    The entry value updated each time an asset provided or revoked.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    Parameters

    • __namedParameters: {
          assign?: undefined;
          byDefault?: ((this, target) => TValue);
          create(this, assets, target) => TValue;
      }

    Returns Definer<TValue, TAsset>

    New context entry definer.

  • Creates single-valued context entry definer with internal state based on entry asset list and without default state.

    The internal state updated each time an asset provided or revoked.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    • TState = TValue

      Internal state type.

    Parameters

    Returns Definer<TValue, TAsset>

    New context entry definer.

  • Creates single-valued context entry definer with internal state based on entry asset list.

    The internal state updated each time an asset provided or revoked.

    Type Parameters

    • TValue

      Context value type.

    • TAsset = TValue

      Context value asset type.

    • TState = TValue

      Internal state type.

    Parameters

    Returns Definer<TValue, TAsset>

    New context entry definer.

Generated using TypeDoc