import { DynamicActionsState } from '../../common' ; import { ActionFactory } from '../types' ; export const dynamicActionFactoriesCollector = ( getActionFactory , state , stats ) : Record < string , string | number | boolean > => { for ( const event of state . events ) { const factory = getActionFactory ( event . action . factoryId ) ; if ( factory ) { stats = factory . telemetry ( event , stats ) ; } } return stats ; } ;