Typescript Type In Array Javascript Length Method