import { GameEvent } from '../../../../../models/game-event' ; import { RealTimeStatsState } from '../real-time-stats' ; import { EventParser } from './_event-parser' ; export class RTStatsMetadataParser implements EventParser { applies ( gameEvent , currentState ) { return gameEvent . type === GameEvent . MATCH_METADATA ; } parse ( gameEvent , currentState ) { return currentState . update ( { gameType : gameEvent . additionalData . metaData . GameType , } as RealTimeStatsState ) ; } name ( ) { return 'RTStatsMetadataParser' ; } }