I'm using Visual Studio 2015 Update 1 with TypeScript 1.8.5.
I have an ASP.NET MVC 4.6 Web Application that uses Angular2.
I set up my TypeScript compile options using the following settings:
<PropertyGroup>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
<TypeScriptModuleKind>System</TypeScriptModuleKind>
<TypeScriptModuleResolution>node</TypeScriptModuleResolution>
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
<TypeScriptOutFile />
<TypeScriptOutDir />
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
<TypeScriptSourceMap>True</TypeScriptSourceMap>
<TypeScriptMapRoot />
<TypeScriptSourceRoot />
<TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
</PropertyGroup>
The ErrorList contains no build errors, but it does contain Intellisense errors, such as the following:
Cannot find module 'angular2/core'
But Angular2 as well as all of my other dependencies are where they should be, under the node_modules folder.
So the TypeScript compiles successfully to JavaScript and the resulting JavaScript works at runtime, but I see Intellisense errors in the Visual Studio environment across most of my application's TypeScript files.
Additionally, some of the components I rely, such as ag-grid-ng2, have proper TypeScript definition files under node_modules but Intellisense treats them as if they are not typed (in other words, typed as 'any')
Why?