UNPKG

anonymous-student

Version:

Anonymous student is used to retrieve and save information from our website users.

14 lines (11 loc) 806 B
import { IEventAggregationService } from '@studyportals/event-aggregation-service-interface'; import { AnonymousStudentServiceReady } from '../interfaces/events'; import { AnonymousStudentService } from './application/anonymous-student-service'; import { StudentRepository } from './domain/student-repository'; const eventAggregationService: IEventAggregationService = window['EventAggregationService']; const studentRepository = new StudentRepository(eventAggregationService, window['SessionService']); const anonymousStudent = new AnonymousStudentService(studentRepository); window['AnonymousStudent'] = anonymousStudent; studentRepository.initialize(); const event = new AnonymousStudentServiceReady(anonymousStudent); eventAggregationService.publishTo(AnonymousStudentServiceReady.EventType, event);