From 1343b32aa9eda47da17cd869f96ae1e2ac488a89 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Tue, 28 Jan 2014 15:53:12 -0500 Subject: [PATCH] Create jquery.simulate.d.ts I choose to go with a more relaxed definition (versus specifying the exact options allowed for each event type) because it would have required duplicating event definitions from lib.d.ts (the properties of the events in lib.d.ts are all mandatory whereas they would be optional in this usage). --- jquery.simulate/jquery.simulate.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jquery.simulate/jquery.simulate.d.ts diff --git a/jquery.simulate/jquery.simulate.d.ts b/jquery.simulate/jquery.simulate.d.ts new file mode 100644 index 0000000000..65114ad70f --- /dev/null +++ b/jquery.simulate/jquery.simulate.d.ts @@ -0,0 +1,19 @@ +// Type definitions for jquery.simulate.js +// Project: https://github.com/jquery/jquery-simulate +// Definitions by: Derek Cicerone +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface JQuery { + + /** + * Simulates an event. + * + * @param type + * the type of event (eg: "mousemove", "keydown", etc...) + * @param options + * the options for the event (these are event-specific) + */ + simulate(type: string, options?: any): void; +}