Typescript Remove Item From Array Based Implementation Of Queue