to(a: any): Morphable;\r
}\r
\r
- type ListEachCallback<T> = (el: T, index: number, list: List<T>) => any\r
+ type ListEachCallback<T extends ElementAlias> =\r
+ (el: T, index: number, list: List<T>) => any;\r
\r
// List.js\r
- class List<T> extends BuiltInArray<T> {\r
- each(fn: ListEachCallback<T>): List<any>\r
- each(name: string, ...args: any[]): List<any>\r
- toArray(): T[]\r
+ class List<T extends ElementAlias> extends BuiltInArray<T> {\r
+ each(fn: ListEachCallback<T>): List<any>;\r
+ each(name: string, ...args: any[]): List<any>;\r
+ toArray(): T[];\r
}\r
\r
class Eventobject {\r
\r
// ForeignObject.js\r
class ForeignObject extends Element {\r
- constructor(node?: SVGForeignObjectElement, attrs?: object)\r
- constructor(attrs?: object)\r
- add(element: Dom, i?: number): ForeignObject\r
+ constructor(node?: SVGForeignObjectElement, attrs?: object);\r
+ constructor(attrs?: object);\r
+ add(element: Dom, i?: number): this;\r
}\r
\r
// image.js\r