##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r2:8ec37bf1b4d1 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
_Container.d.ts
39 lines | 1.2 KiB | video/mp2t | TypeScriptLexer
import { DeclareConstructor } from "dojo/_base/declare";
import _WidgetBase = require("./_WidgetBase");
interface _Container {
buildRendering(): void;
/**
* Makes the given widget a child of this widget.
*/
addChild<T extends _WidgetBase>(widget: T, insertIndex?: number): void;
/**
* Removes the passed widget instance from this widget but does
* not destroy it. You can also pass in an integer indicating
* the index within the container to remove (ie, removeChild(5) removes the sixth widget)
*/
removeChild<T extends _WidgetBase>(widget: T): void;
removeChild<T extends number>(widget: number): void;
/**
* Returns true if widget has child widgets, i.e. if this.containerNode contains widgets.
*/
hasChildren(): boolean;
/**
* Gets the index of the child in this container or -1 if not found
*/
getIndexOfChild<T extends _WidgetBase>(widget: T): number;
}
declare module "dojo/_base/kernel" {
interface Dijit {
_Container: _ContainerConstructor
}
}
type _ContainerConstructor = DeclareConstructor<_Container>;
declare const _Container: _ContainerConstructor;
export = _Container;