Typescript Get Type In Array Javascript Push To Beginning