import { BatchedRepeatable } from "./batched-repeatable.class"; export class BatchedRepeatableFactory { public static $inject = ['$timeout']; constructor(private $timeout: ng.ITimeoutService) { } public create(collection: T[], batchSize?: number) { return new BatchedRepeatable(collection, batchSize, this.onDispatch.bind(this)); } private onDispatch(batch: T[]) { return this.$timeout(() => { }, 0); } }