Installation
npm install --save @types/backbone.layoutmanager
Summary
This package contains type definitions for backbone.layoutmanager (http://layoutmanager.org/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/backbone.layoutmanager.
index.d.ts
/// <reference types="jquery" />
import * as Backbone from "backbone";
declare module "backbone" {
interface LayoutOptions<TModel extends Model> extends ViewOptions<TModel> {
template?: string | undefined;
views?: { [viewName: string]: View<TModel> } | undefined;
}
interface LayoutManagerOptions {
manage?: boolean | undefined;
el?: boolean | undefined;
}
class Layout<TModel extends Model> extends View<TModel> {
template: string;
constructor(options?: LayoutOptions<TModel>);
beforeRender(): void;
afterRender(): void;
cleanup(): void;
fetchTemplate(path: string): (context: any) => string;
async(): (compiled: (context: any) => void) => void;
promise(): JQueryPromise<any>;
getAllOptions(): LayoutOptions<TModel>;
getView(fn?: any): any;
getViews(fn?: any): any[];
insertView(selector: any, view?: any): any; // return view;
insertViews(views: any): Layout<TModel>; // return this;
remove(): this;
removeView(fn: any): Layout<TModel>;
render(): this;
renderViews(): Layout<TModel>; // return this
setView<U>(name: any, view: U, insert?: boolean): U; // return view
setViews(views: any): Layout<TModel>; // 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<Model>): void;
}
}
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: @types/backbone, @types/jquery
Credits
These definitions were written by He Jiang.