From 51a0c43568c00e9fc78b064cbfa235397b7d76d0 Mon Sep 17 00:00:00 2001 From: Erik Hesselink Date: Thu, 5 Dec 2013 14:18:50 +0100 Subject: [PATCH] jQuery: add overload for 'off' accepting a handler but no selector. --- jquery/jquery.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 95c81d9161..cb9ccb9d86 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -1108,6 +1108,13 @@ interface JQuery { * @param handler A handler function previously attached for the event(s), or the special value false. */ off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; + /** + * Remove an event handler. + * + * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". + * @param handler A handler function previously attached for the event(s), or the special value false. + */ + off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery; /** * Remove an event handler. *