This project is read-only.

/// <reference... observation/question about "Comment" includes

Topics: General
Mar 8, 2014 at 1:42 PM
I am using Visual Studio 2013 Professional.

I recently updated to the 1.0RC version for TypeScript. I had been using 9.1.1. I noticed a difference in the way the compiler handles the /// <reference... comment to include ts files. Formerly, I was able to include .js files in my Jasmine Unit test project (without any compile errors), which is required because I am using ReSharper, which does not yet support TypeScript Unit testing.

The unit tests run properly when I include the /// <reference path="../Buffer.js" /> comment, but the project shows an error for each of the includes. Since I have MANY such includes, it generates a very large number of errors. The good news is that the tests do run properly, but the bad news is that the large number of 'include' errors makes it very difficult to detect real errors.

Is there any workaround for this?

Mar 8, 2014 at 2:29 PM
I figured out how to eliminate the errors.

Originally, I had created .ts test files because I had thought Resharper could perform Jasmine unit tests for TypeScript. Later, I found out from the Resharper folks that this configuration will not be supported until the next release. I had written unit tests in JavaScript but had placed the tests in .ts files so that I could easily migrate to TypeScript unit testing when supported by Resharper. However, with the latest TypeScript version I started seeing the compile errors.

What I did was to rename all the .ts files to .js and it compiled without errors. I will have to changed back to .ts files when ReSharper supports this configuration, but that is not a big deal.