I\'m very new to typescript and am trying it out in the latest Visual Studio 2015 RC.
At the moment it compiles the typescript file automatically and creates the und
I found that by unloading the project and editing the 'xproj' file, if I add the following xml under the project node (before the property group containing 'VSToolsPath'):
<PropertyGroup>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptCompileOnSaveEnabled>true</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>false</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
<TypeScriptOutFile></TypeScriptOutFile>
<TypeScriptOutDir></TypeScriptOutDir>
<TypeScriptGeneratesDeclarations>false</TypeScriptGeneratesDeclarations>
<TypeScriptSourceMap>true</TypeScriptSourceMap>
<TypeScriptMapRoot></TypeScriptMapRoot>
<TypeScriptSourceRoot></TypeScriptSourceRoot>
<TypeScriptNoEmitOnError>true</TypeScriptNoEmitOnError>
</PropertyGroup>
This fixed the issue and the .map files were generated on save (neatly under the js files). This enables me to hit my typescript breakpoints in Visual Studio (only with IE unfortunately).
Another beneficial side effect is that I can now export modules (because of the 'TypeScriptModuleKind' => AMD setting).
I found another solution for .NET 4x projects within https://github.com/Microsoft/TypeScript/issues/5001:
Toggling some random setting on the TypeScript Build tab (with "Generate source maps" enabled) in the project properties added new TypeScript configuration lines to the project file, (finally) resulting in the Source Maps generated both upon save and (project) build.
I've found an alternative if you go to add a new file to your project, there is a typescript configuration file option. So if you add a 'tsconfig.json' you get the same settings:
{
"compilerOptions": {
"module": "amd",
"noEmitOnError": true,
"noImplicitAny": false,
"removeComments": false,
"sourceMap": true,
"target": "es5"
}
}
I guess this is better as it would potentially allow multiple configurations for different typescript apps in different folders. For my project I've just placed it in the root to apply globally.