From 33c1eb08b08a3cd221f84d16a7696b45df1a0f19 Mon Sep 17 00:00:00 2001 From: Peter Palotas Date: Sun, 28 Dec 2014 12:39:52 +0100 Subject: [PATCH] Updated marionette.js to comply with version 2.3.0. closeXXX() functions were renamed to destroyXXX() in version 2.0 of marionette, the same time that Layout was renamed to LayoutView which was already incorporated in these definitions. --- marionette/marionette.d.ts | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/marionette/marionette.d.ts b/marionette/marionette.d.ts index 730ba4880..91b9f9859 100644 --- a/marionette/marionette.d.ts +++ b/marionette/marionette.d.ts @@ -138,7 +138,7 @@ declare module Marionette { } class Controller extends Backbone.Events { - close(); + destroy(); } class Region extends Backbone.Events { @@ -150,9 +150,12 @@ declare module Marionette { show(view: Backbone.View): void; ensureEl(): void; open(view: Backbone.View): void; - close(): void; + destroy(): void; attachView(view: Backbone.View); reset(); + hasView(): boolean; + empty(); + } class RegionManager extends Controller { @@ -161,8 +164,8 @@ declare module Marionette { get(name: string): Region; removeRegion(name): void; removeRegions(): void; - closeRegions(): void; - close(); + emptyRegions(): void; + destroy(); //mixins from Collection (copied from Backbone's Collection declaration) @@ -221,7 +224,7 @@ declare module Marionette { delegateEvents(events?: any): any; undelegateEvents(); - close(); + destroy(); bindUIElements(); unbindUIElements(); @@ -235,8 +238,7 @@ declare module Marionette { ui(): any; serializeData(): any; - render(): ItemView; - close(); + render(): ItemView; } class CollectionView extends View { @@ -260,13 +262,13 @@ declare module Marionette { buildItemView(item: any, ItemViewType: any, itemViewOptions: any): any; removeItemView(item: any); removeChildView(view: View); - + isEmpty(): boolean; checkEmpty(); appendHtml(collectionView: View, itemView: View, index: Number); - close(); - closeChildren(); + destroy(); + destroyChildren(); } class CompositeView extends CollectionView { @@ -290,7 +292,7 @@ declare module Marionette { render(): LayoutView; removeRegion(name: string); } - + interface AppRouterOptions extends Backbone.RouterOptions { appRoutes: any; controller: any; @@ -316,7 +318,7 @@ declare module Marionette { addInitializer(initializer); start(options?); addRegions(regions); - closeRegions(): void; + emptyRegions(): void; removeRegion(region: Region); getRegion(regionName: string): Region; module(moduleNames, moduleDefinition);