Typescript New Array Javascript Length Function