Skip to content

flatForEach

flatForEach<S, B>(source, binding, body): FlatForEachSpec<S extends FluentSpec<X> ? X : S & Spec, B extends FluentSpec<Y> ? Y : B & Spec>

Defined in: extract/spec.ts:1105

Iterate over values from source and flatten body results into a single array. Like forEach but the body must produce arrays, which are concatenated.

S extends SpecLike

B extends SpecLike

S

string

B

FlatForEachSpec<S extends FluentSpec<X> ? X : S & Spec, B extends FluentSpec<Y> ? Y : B & Spec>

flatForEach(
literal(['sheet1', 'sheet2']),
'sheetName',
someArraySpecThatUsesSheetName
)