import { Pull , types as idbTypes } from "indexeddb" ; import PostQueue from "./post-queue" ; import Servers from "./servers" ; import * as types from "./types" ; export default class PullForServers extends Pull { servers : Servers ; postQueue : PostQueue ; constructor ( servers , options ) { super ( ) ; this . servers = servers ; this . postQueue = new PostQueue ( this . servers , options ) ; } receive ( updates , callback ) { if ( ! Array . isArray ( updates ) ) { updates = [ updates ] ; } this . postQueue . add ( updates , callback ) ; } }