Typescript Get Type Of Array Javascript Iterations