react-native-lightspeedsdk
Version:
A react-native interface for using the LightspeedSDK
37 lines (29 loc) • 844 B
JavaScript
;
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;