BACK
Referencerepeat
Reference · 93

repeat

Re-subscribes to source after complete.

Signature

repeat(countOrConfig?: number | RepeatConfig): MonoTypeOperatorFunction

What it does

When source completes, repeat creates a new subscription. The number of repeats is set by a number or a config.

When to use

Repeating a finite task several times, looping demo streams, polling after complete.

Gotcha

repeat reacts to complete, not error. For errors, use retry.

See also

retry, repeatWhen

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