Typescript Array Delete Last Search History