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

Constructor

Modifiers

Description

(constructor)(entries, uniqueKeySelector)

Constructs a new instance of the UniqueBatchEntries class

Properties

Property

Modifiers

Type

Description

groups

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

Methods

Method

Modifiers

Description

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