Typescript Get Type Of Array Javascript Methods And Functions