Skip to content

Function: flat()

flat<T>(depth, …sources): Sequence<T>

Same semantics as Array.prototype.flat (arrays only). depth leads so the sources can stay variadic; use depth < 1 for a no-op passthrough.

T

number

How many array levels to flatten.

…readonly Source<T>[]

Containers to concatenate, then flatten (nullish skipped).

Sequence<T>