import { Contracts } from '../contracts' ; import { ILanguage } from '../models' ; export class LanguageMapper { mapMultipleLanguages ( response ) { return response . languages . map ( ( language ) => { return this . mapLanguage ( language ) ; } ) ; } private mapLanguage ( language ) { if ( ! language ) { throw Error ( `Cannot map language` ) ; } return { system : language . system } ; } }