sampleItems()
Create a dataset generator from a single-item factory and a fixed count. This generates new items. It does not sample an existing array.
Import
Signature
Parameters
Parameters
paramsSampleItemsParams<DATA_ITEM>required
Item count and generator factory.
Example
Return value and errors
Returns a synchronous Result containing an asynchronous generator. Calling
sampleItems() validates the count but does not generate cases. If the item
factory throws or rejects later, the generator rejects. When used by
evaluate(), that is an evaluation data-loading failure.
See defineDataset() for persistence and overwrite behavior.