Skip to content

Instantly share code, notes, and snippets.

@ksummerlin
Last active December 16, 2015 21:59
Show Gist options
  • Select an option

  • Save ksummerlin/5503457 to your computer and use it in GitHub Desktop.

Select an option

Save ksummerlin/5503457 to your computer and use it in GitHub Desktop.
Using third-party libraries in TypeScript with ambient declarations.
/// <reference path="../Scripts/typings/jquery/jquery.d.ts" />
$('a').click(function () {
alert('clicked');
});
@ksummerlin

Copy link
Copy Markdown
Author

In this last revision, we have included a reference to the jQuery declarations file downloaded from Github/DefinitelyTyped. The full declaration file gives you much better intellisense than just using a simple variable declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment