Typescript Mapped Type Array To Object In Js W3school