Typescript If Array Not Arraylist Sort