There are probably like three people doing what I'm doing but here goes:
When creating tests for Chutzpah, I need to add references not only to my typescript files but also to the javascript libraries that I'm using. For example:
// Typescript References (for tsc)
/// <reference path="../ref/angular-1.0.d.ts" />
// JavaScript references (for chutzpah)
/// <reference path="../lib/angular.min.js" />
// TS references for what we're actually testing...
/// <reference path="../src/modules.ts" />
With this setup, my typescript-authored jasmine tests are running great. However, the angular.min.js file is filling up my error list with hundreds of complaints. This makes it impossible to find errors that are reported by the typescript syntax checker.
If I remove the reference to angular.min.js, then Chutzpah cannot run since my code depends on the library.
Is there a way to force Visual Studio to ignore errors in a particular JavaScript file reference?
This issue is now solved in Chutzpah 2.4.
Chutzpah Specific Reference
With the addition of TypeScript support a few releases ago several people reported issues when using Chutzpah with the TypeScript plugin in VS. The problem occurs since both TypeScript and Chutzpah are using the comments for different purposes. To get around this issue Chutzpah now supports two ways to reference dependent files.
The existing general way
/// <reference path="foo.js" />
The new Chutzpah specific way
/// <chutzpah_reference path="foo.js" />
Using the latter will let Chutzpah know about your dependency graph and should not confuse the TypeScript compiler.
This is a bug with Chutzpah which the developer now appears to be aware of:
http://chutzpah.codeplex.com/discussions/404083#post1008911
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With