MtnManChris MtnManChris - 1 year ago 130
Javascript Question

Incorporate JQuery into Typescript VS 2013

I'm new to Typescript. I'm using VS 2013 and have the typescript templates installed but moving over existing javascript code fails when trying to compile the $ directive in JQuery. Everything I've seen says to get a .d.ts file from, but there are literally 1000's of files and, again literally no instructions.

I've use NuGet to add this file to my project, but yet the error persists.

<?xml version="1.0" encoding="utf-8"?>
<package id="jquery.TypeScript.DefinitelyTyped" version="3.0.6" targetFramework="net45" />

What am I missing?

Answer Source

You can use Typings, Oficial TypeScript Definition Manager. It will help you download the necessary files.

To use, first you must install NodeJs then install it by typing npm install typings --global using prompt command. After that, go to the root of your project using the prompt command and then type typings install jquery --save.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download