Once you've installed node.js, just type "npm install -g typescript" in a terminal, and the typescript compiler will be installed.