2018-10-19 10:50:50   Visit  32

全局安装TS

npm install -g typescript

在项目根目录添加 tsconfig.json

{
    \"compilerOptions\": {
        \"strictNullChecks\": true,
        \"moduleResolution\": \"node\",
        \"allowSyntheticDefaultImports\": true,
        \"experimentalDecorators\": true,
        \"jsx\": \"preserve\",
        \"noUnusedParameters\": true,
        \"noUnusedLocals\": true,
        \"target\": \"es6\",
        \"lib\": [
            \"dom\",
            \"es7\"
        ]
    },
    \"exclude\": [
        \"node_modules\",
        \"lib\",
        \"es\"
    ]
}
©2017 Leechg.com