# TypeScript quick notes ###### tags: `js` ## 網路資源 https://pjchender.dev/typescript/ts-functions/ ## 環境設定 https://ithelp.ithome.com.tw/articles/10224788 安裝 ```clike! npm install -g typescript ``` 檢查版本 ```clike! tsc -v ``` 設定 開新的資料夾 架構如下: folder | |_dist |_src tsfong.json tsconfig.json內容 ``` { "compilerOptions": { "outDir": "dist" }, "include": [ "./src/**/*.ts" ] } ``` 建立好之後可以在資料夾內開terminal(建議用vscode) ```clike! tsc --watch ``` 之後只要在src內的ts檔案有更改, 都會自動將編譯好的js檔案放到dist資料夾
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up