Skip to content

Instantly share code, notes, and snippets.

@afternoon
Last active August 29, 2015 13:56
Show Gist options
  • Save afternoon/9022941 to your computer and use it in GitHub Desktop.
Save afternoon/9022941 to your computer and use it in GitHub Desktop.
A few example type definitions
// FastClick - courtesy of https://gist.github.com/yaakaito/6267527
interface FastClickStatic {
attach(element: HTMLElement): void;
}
declare var FastClick: FastClickStatic;
// add a custom Jasmine matcher to the standard set
// the matcher requires a momentjs object, so let's enforce that
// TypeScript module and interface definitions are open, so can be extended
declare module jasmine {
interface Matchers {
toBeSameMomentAs(expected: Moment): boolean;
}
}
// declare the forge global provided by Trigger.io
// just declare it as any rather than going into the detail of the structure
declare var forge: any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment