From f8cbbfaae7cd537a39e32e527724232f6fbc234e Mon Sep 17 00:00:00 2001 From: Guus Goossens Date: Mon, 25 Feb 2013 13:43:30 +0100 Subject: [PATCH 1/3] Optional parameters for Backbone. --- backbone/backbone.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 0c688f308..04bee0f5d 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -11,14 +11,14 @@ declare module Backbone { export interface AddOptions extends Silenceable { at: number; } - + export interface CreateOptions extends Silenceable { wait: bool; } - + export interface HistoryOptions extends Silenceable { - pushState: bool; - root: string; + pushState?: bool; + root?: string; } export interface NavigateOptions { @@ -30,7 +30,7 @@ declare module Backbone { } export interface Silenceable { - silent: bool; + silent?: bool; } interface on { (eventName: string, callback: (...args: any[]) => void, context?: any): any; } @@ -68,8 +68,8 @@ declare module Backbone { constructor (attributes?: any, options?: any); initialize(attributes?: any); - get(attributeName: string): any; - set(attributeName: string, value: any, options?: Silenceable); + get(attributeName: string): any; + set(attributeName: string, value: any, options?: Silenceable); set(obj: any, options?: Silenceable); change(); From 62bc3e0772cdb54b1ae297f2a7500ae6885f2973 Mon Sep 17 00:00:00 2001 From: Guus Goossens Date: Mon, 25 Feb 2013 16:36:04 +0100 Subject: [PATCH 2/3] Add JQueryPopStateEventObject for popstate events. I think this is the right way to do this. Let me know if not! --- jquery/jquery.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index ae75ea581..af17e8d6b 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -156,7 +156,12 @@ interface JQueryKeyEventObject extends JQueryInputEventObject keyCode: number; } -interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject { +interface JQueryPopStateEventObject extends BaseJQueryEventObject +{ + originalEvent: PopStateEvent; +} + +interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject, JQueryPopStateEventObject { } /* From d53bedb39c6c44f6985e4ab717a124f2c2a79ba5 Mon Sep 17 00:00:00 2001 From: Dan Ludwig Date: Mon, 25 Feb 2013 15:15:13 -0500 Subject: [PATCH 3/3] Remove ko.utils.setTextContent from public knockout utils API surface. Although this function is available via knockout-{version}.debug.js, it is not part of the minified knockout-{version}.js file. Invoking this function will cause a runtime javascript error when invoked against the minified js. See this for more info: https://github.com/SteveSanderson/knockout/issues/670 --- knockout/knockout.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index aefcc797a..c13856198 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -337,7 +337,7 @@ interface KnockoutUtils { toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: bool): void; - setTextContent(element: any, textContent: string): void; + //setTextContent(element: any, textContent: string): void; // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 setElementName(element: any, name: string): void;