update typescript code example Example 1: install typescript npm install -g typescript Example 2: how to update typescript npm install -g typescript@latest