Wednesday, 28 March 2018

TypeScript - Importing jQuery TypeScript Definitions (d.ts) for Visual Studio 2017

TypeScript is building in popularity and JQuery is remains one of the most popular JavaScript frameworks. Consequently you will typically want to use them together in the same project at one stage or another.
If you do want to use JQuery within your TypeScript files in Visual Studio 2017, you need a "DefinitelyTyped" definition specifically for jQuery. This will allow Visual Studio to correctly recognise jQuery objects when validating and compiling (or transpiling based on your preferred terminology).


To do this, just download the TypeScript definitions (d.ts) for jQuery through the Nuget Package Manager (npm) UI or with the Nuget package manager console, use the following command:

Install-Package jquery.TypeScript.DefinitelyTyped

Now the typescript compiler will recognise your jQuery calls:


DDK

5 comments:

Unknown said...

Thanks for giving great kind of information. So useful and practical for me. Thanks for your excellent blog, nice work keep it up thanks for sharing the knowledge.
Tourist visa provider in Delhi

hookstefan said...

Great data on your Article, thank you for setting aside the effort to impart to us such a pleasant article. Astonishing understanding you have on this present, it's decent to discover a site that subtleties such a great amount of data about various specialists.
my assignment help

hrroman said...

If you are stuck with your Management assignment then in this case you can opt for our Management Assignment. we provide the bestMarketing assignment help.We also provideConsumer Behaviour Assignment Help for students across the globe. for more information contact us +16692714848.

PMP Certification said...


You really make it look so natural with your exhibition however I see this issue as really something which I figure I could never understand. It appears to be excessively entangled and incredibly expansive for me.
360DigiTMG Artificial intelligence Malaysia

Antony Christ said...

It was nice to read your blog. If anyone needs any type of case study and assignment help at the cheapest price then visit our website:- My Case Study Help. We are the best Assignment Help Australia website, provide all types of services for MBA Assignment Help, Nursing Case Study Help, Law Case Study Help and Engineering students. Avail Assignment Writing Service with the world's most trusted and no1 company for Case Study and Assignment Help in Australia. Get professionally prepared assignment by our amazing Case Study Writers with 100% quality check and plagiarism free paper.