update and format typescript with new content