Set up the build
Right click on the project and click New Item. Then choose TypeScript Configuration File and use the default name tsconfig.json
.
Replace the default tsconfig.json
with the following:
{ "compilerOptions": { "noImplicitAny": true, "noEmitOnError": true, "sourceMap": true, "target": "es5", "outDir": "./Scripts/App" }, "files": [ "./src/app.ts", ], "compileOnSave": true }
This is similar to the default, with the following differences:
- It sets
"noImplicitAny": true
. - It specifies that
"outDir": "./Scripts/App"
. - It explicitly lists
"files"
instead of relying on"excludes"
. - It sets
"compileOnSave": true
.
"noImplicitAny"
is good idea whenever you’re writing new code — you can make sure that you don’t write any untyped code by mistake. "compileOnSave"
makes it easy to update your code in a running web app. See the tsconfig.json documentation for more information.
Please login to continue.