BACK
ReferenceendWith
Reference · 60

endWith

Appends values to the end of the stream before complete.

Signature

endWith(...values: A): OperatorFunction

What it does

Passes through all of source's values and, once source completes, synchronously emits the given values and ends the stream.

When to use

A final status, a completion marker, adding a sentinel value after the data.

See also

startWith, concatWith

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...