Typescript Replaceall Is Not A Function Error