因为npm没有设置国内镜像服务器(因为大部分内容要去外网下载,直连比较慢)
先执行npm config set registry http://registry.npm.taobao.org
再执行安装typescript命令。