Home > @uniformdev/canvas > UniqueBatchEntries

UniqueBatchEntries class

Given a batch of enhancements containing potentially duplicate entries (i.e. several components referencing the same thing), group them together by some unique identifier and enable simpler batch processing.

Signature:

Constructors

ConstructorModifiersDescription
(constructor)(entries, uniqueKeySelector)Constructs a new instance of the <code>UniqueBatchEntries</code> class

Properties

PropertyModifiersTypeDescription
groupsReadonly<Record<string, ReadonlyArray<Readonly<BatchEntry<TArgs, TResult>>>>>

Methods

MethodModifiersDescription
resolveKey(key, result)Resolves all entries in a group key with the same result value.
resolveRemaining(value)Resolves all remaining entries that have not been otherwise resolved with a specific value