In my development journey, I decided to create a Typescript blank Cordova project within Visual Studio 2015.
After adding a small test bit of ts code...
function onResume() {
// TODO: This application has been reactivated. Restore application state here.
var i: string;
i = "test";
}
I proceeded to build and confirmed that the code was successfully compiled into appbundle.js where I could review it.
function onResume() {
// TODO: This application has been reactivated. Restore application state here.
var i;
i = "test";
}
Now, I aim to incorporate typescript in VS Code as well, ensuring both Visual Studio and VS Code utilize the same version.
Upon checking, I discovered that I have
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.6
and C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.7
. However, these paths are not included in my path variables, and attempting to run tsc
from the command line results in it not being found.
In examining the project file, I only found references to TypeScript which included:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
<PropertyGroup>
<TypeScriptCompileOnSaveEnabled>false</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\ApacheCordovaTools\vs-mda-targets\Microsoft.TypeScript.MDA.targets" />
No other files contained any references to TypeScript.
If I opt to install via npm, how can I instruct Visual Studio to recognize the new version?
Your help is greatly appreciated!