Typescript Get Part Of String Javascript Methods