I'm trying to convert a comma-separated string(knowing the possible variations) to an array using each element of the array as key of a dictionary of icons.
const homesArray:Array<HomeArrayType> = homes.split(homes) // here homesArray shows the following error: Type 'string[]' is not assignable to type 'HomeArrayType[]'. Type 'string' is not assignable to type 'HomeArrayType'.(232
const iconos = homesArray.map(home => Iconos[home]) // here Iconos[home] showsthe following error: Element implicitly has an 'any' type because expression of type 'HomeArrayType' can't be used to index type '{ house: string; appartment: string; }'. Property 'house, house' does not exist on type '{ house: string; appartment: string; }'.(7053)