Typescript Type Array Object In Javascript Definition Functions