// Type definitions for Backbone.LayoutManager 0.9 // Project: http://layoutmanager.org/ // Definitions by: He Jiang // Definitions: https://github.com/hejiang2000/DefinitelyTyped // TypeScript Version: 2.8 /// import * as Backbone from 'backbone'; declare module 'backbone' { interface LayoutOptions extends ViewOptions { template?: string; views?: { [viewName: string]: View }; } interface LayoutManagerOptions { manage?: boolean; el?: boolean; } class Layout extends View { template: string; constructor(options?: LayoutOptions); beforeRender(): void; afterRender(): void; cleanup(): void; fetchTemplate(path: string): (context:any)=>string; async():(compiled:(context:any)=>void)=>void; promise(): JQueryPromise; getAllOptions(): LayoutOptions; getView(fn?:any): any; getViews(fn?:any): any[]; insertView(selector:any, view?:any): any; // return view; insertViews(views:any): Layout; // return this; remove(): Layout; removeView(fn:any): Layout; render(): Layout; // return this renderViews(): Layout; // return this setView(name: any, view: U, insert?:boolean): U; // return view setViews(views:any): Layout; // return this then(fn:()=>void):void; static cache(path: string, contents?: any): any; static cleanViews(views: any): void; static configure(options: LayoutManagerOptions): void; static setupView(views: any, options?: LayoutOptions): void; } }