Typescript Remove Last Char