Function: interval() 
interval(
intervalMs):Stream<number>
Defined in: streams/interval.ts:16
Creates a stream that emits incremental numbers starting from 0 at a regular interval.
This operator is a shorthand for timer(0, intervalMs), useful for creating a simple, repeating sequence of numbers. The stream emits a new value every intervalMs milliseconds. It is analogous to setInterval but as an asynchronous stream.
Parameters 
intervalMs 
number
The time in milliseconds between each emission.
Returns 
Stream<number>
A stream that emits incrementing numbers (0, 1, 2, ...).
Examples 
From interval.spec.ts:4
typescript
const intervalMs = 100;
const intervalStream = interval(intervalMs).pipe(take(3));
const emittedValues: number[] = [];
const timestamps: number[] = [];
await new Promise<void>((resolve) => {
  intervalStream.subscribe({
    next: (value) => {
      emittedValues.push(value);
      timestamps.push(Date.now());
    },
    complete: () => {
      resolve();
    },
  });
});
expect(emittedValues.length).toBe(3);
expect(emittedValues).toEqual([0, 1, 2]);
for (let i = 1; i < timestamps.length; i++) {
  const timeDiff = timestamps[i] - timestamps[i - 1];
  expect(timeDiff).toBeGreaterThanOrEqual(intervalMs - 20);
  expect(timeDiff).toBeLessThanOrEqual(intervalMs + 20);
}