Skip to content

flat()

Flattens Store<Store<T>> with switch semantics (same as switchMap(identity)).

Signature

ts
function flat<T>(): StoreOperator<Store<T> | undefined, T | undefined>
function flat<T>(opts: { initial: T }): StoreOperator<Store<T> | undefined, T>

Parameters

ParameterTypeDescription
opts`{
initial?: T;

}| Optionalto narrowget()` before the first inner emission. |

Returns

StoreOperator — Tier 2; reactive inner subscription on outer DATA only.

See Also

Released under the MIT License.