/* 安裝typescript npm install -g typescript (全局) 我們用 tsc 命令來編譯它 tsc hello-world 接下來,需要創建一個以.ts 為擴展名的文件,比如 typescriptTest.ts */
報錯
tsc : 無法加載文件 D:\Program Files\nodejs\tsc.ps1,因為在此系統上禁止運行腳本。有關詳細信息,請參閱 https:/go.microsoft.com/fwlink
1.管理員身份運行vs code 2.在終端執行:get-ExecutionPolicy,顯示Restricted 3.在終端執行:set-ExecutionPolicy RemoteSigned 4.在終端執行:get-ExecutionPolicy,顯示RemoteSigned