import { PartitionConfig } from './AuxPartitionConfig' ; import { AuxPartition , MemoryPartition } from './AuxPartition' ; import { BotsState , BotAction , Bot , UpdatedBot } from '../bots' ; import { Observable , Subject } from 'rxjs' ; export type AuxPartitionFactory = ( config : PartitionConfig ) => Promise < AuxPartition > | AuxPartition ; param config param factories export async function createAuxPartition ( config , ... factories ) { for ( let factory of factories ) { let result = await factory ( config ) ; if ( result ) { return result ; } } return undefined ; }