Typescript Turn Array Into Object Javascript Mdn Dom Events Mdn