I created my first TypeScript file using the VS2012 plugin and web essentials:
///<reference path='/Scripts/jquery/jquery.d.ts' />
/*jslint browser: true*/
/*jslint vars: true */
/*global $, jQuery*/
/*global ajaxOnFailure, doAddSubmit, doResetTabs*/
/*global mvcOnFailure, updateGridMeta*/
function alertWin(title, message) {
$.modal({
content: '<p class="align-center">' + message + '</p>',
title: title,
minWidth: 150,
maxWidth: 900,
maxHeight: 600,
width: false,
buttons: {
'Ok': function (win) { win.closeModal(); }
}
});
}
I dragged and dropped the reference file from the solution to the top of the file and it does exist.
However as soon as it's dragged I get a red line under it saying "referenced file does not exist". I also note that it does not seem to recognize the $
in my script.
Here's my directory structure:
/Scripts
/jquery/jquery.d.ts
/Shared/dialog/functions/file1.ts <-- the file above
Note:
When I put the .ts file in the same directory as file1.ts and reference as follows then it works:
///<reference path='jquery.d.ts' />
So my question is:
How can I have my jquery.d.ts in just the one place and reference it from my files?