Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SystemJS modules with Visual Studio 2013 and TypeScript

I'm trying to use SystemJS modules in Visual Studio 2013 with TypeScript, but Visual Studio shows errors.

This is my setup:

  • Installed TypeScript Tools for Microsoft Visual Studio 2013 1.8.5.0
  • Uninstalled lower versions of TypeScript
  • Project file (VS 2013 does not support tsconfig.json):

    <TypeScriptToolsVersion>1.8</TypeScriptToolsVersion> <TypeScriptModuleKind >system</TypeScriptModuleKind> <TypeScriptTarget>es5</TypeScriptTarget>

This is what I see:

  • My project compiles successfully
  • In the browser, AngularJs runs successfully
  • But in Visual Studio, I see squiggly lines. Upon hovering it says 'expression statement is not assignment or call':

enter image description here

This issue is related to this question, however, the answer there is 'use VS 2015', which simply is not an option for me.

Is there any way to use SystemJS with TypeScript in Visual Studio 2013? It doesn't have to be ES6-style modules, just any combination of SystemJS and TypeScript will do. Thanks!

like image 987
fikkatra Avatar asked Apr 08 '16 14:04

fikkatra


2 Answers

I don't know if you already tried to set SystemJS as module system in the preferences: pref vb

If still doesn't work, try to follow this guide: http://www.codeproject.com/Articles/1060262/First-Angular-App-with-TypeScript-and-Visual-Studi from "Setting Up Visual Studio Project".

By the way, VB 2013 is a very old version of the software, is there any reason why shouldn't you migrate to a newer version?

like image 150
Alberto Avatar answered Nov 18 '22 03:11

Alberto


It seems that there just isn't a solution for this. Upgrading to VS2015 is the only way to fix it.

like image 2
fikkatra Avatar answered Nov 18 '22 03:11

fikkatra