UNPKG

react-native-lightspeedsdk

Version:
37 lines (29 loc) 844 B
'use strict'; type CountryLanguagesMap = { currentlySupported:Array, laterSupported:Array }; /** * Represents an immutable CountryLanguages */ class CountryLanguages { currentlySupported:Array; laterSupported:Array; constructor(map: CountryLanguagesMap) { var transformCountryLanguageSet = function (countryLanguageSetMap) { return new CountryLanguageSet(countryLanguageSetMap); } if(map.currentlySupported !== null) { this.currentlySupported = map.currentlySupported.map(transformCountryLanguageSet); } else { this.currentlySupported = null; } if(map.laterSupported !== null) { this.laterSupported = map.laterSupported.map(transformCountryLanguageSet); } else { this.laterSupported = null; } Object.freeze(this); } } module.exports = CountryLanguages;