"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var isNumeric_1 = require('../util/isNumeric');
var Observable_1 = require('../Observable');
var async_1 = require('../scheduler/async');
/**
* We need this JSDoc comment for affecting ESDoc.
* @extends {Ignored}
* @hide true
*/
var IntervalObservable = (function (_super) {
__extends(IntervalObservable, _super);
function IntervalObservable(period, scheduler) {
if (period === void 0) { period = 0; }
if (scheduler === void 0) { scheduler = async_1.async; }
_super.call(this);
this.period = period;
this.scheduler = scheduler;
if (!isNumeric_1.isNumeric(period) || period < 0) {
this.period = 0;
}
if (!scheduler || typeof scheduler.schedule !== 'function') {
this.scheduler = async_1.async;
}
}
/**
* Creates an Observable that emits sequential numbers every specified
* interval of time, on a specified IScheduler.
*
* Emits incremental numbers periodically in time.
*
*
*
*
* `interval` returns an Observable that emits an infinite sequence of
* ascending integers, with a constant interval of time of your choosing
* between those emissions. The first emission is not sent immediately, but
* only after the first period has passed. By default, this operator uses the
* `async` IScheduler to provide a notion of time, but you may pass any
* IScheduler to it.
*
* @example