UNPKG

react-native-lightspeedsdk

Version:
45 lines (39 loc) 886 B
import TileContent from './TileContent'; type TilesMap = { tileId : number, priority : number, dismissable : bool, active : bool, actionType : string, action : string, name : string, content : Object, criteria : string }; /** * Represents an immutable user profile */ class Tile { tileId : number; priority : number; dismissable : bool; active : bool; actionType : string; action : string; name : string; content : TileContent; criteria : string; constructor(map: TilesMap) { this.tileId = map.tileId; this.priority = map.priority; this.dismissable = map.dismissable; this.active = map.active; this.actionType = map.actionType; this.action = map.action; this.name = map.name; this.criteria = map.criteria; this.content = new TileContent(map.content); Object.freeze(this); } } module.exports = Tile;