Typescript Get Type Of Array Javascript Function Parameters