Typescript Array Shift Method