"use strict" ; import { Dispatcher } from "../Dispatcher" ; import { assertOK } from "../util/assert" ; export class StoreGroupValidator { /**
     * validate the instance is StoreGroup-like object
     * Context treat StoreGroup like object as StoreGroup.
     */ static validateInstance ( storeGroup ) { assertOK ( storeGroup !== undefined , "store should not be undefined" ) ; assertOK ( Dispatcher . isDispatcher ( storeGroup ) , "storeGroup should be inherited Dispatcher" ) ; assertOK ( typeof storeGroup . onChange === "function" , "StoreGroup should have #onChange method" ) ; assertOK ( typeof storeGroup . getState === "function" , "StoreGroup should have #getState method" ) ; assertOK ( typeof storeGroup . release === "undefined" || typeof storeGroup . release === "function" , "StoreGroup may have #release method" ) ; } }