From: pragdave Date: Sun, 31 May 2020 16:04:10 +0000 (-0500) Subject: slowly iterating towards List nirvana. FO still pending... X-Git-Tag: 3.1.0~19^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8cc714a53bc2e1cf531eb50475285c2a775339aa;p=svg.js.git slowly iterating towards List nirvana. FO still pending... --- diff --git a/svg.js.d.ts b/svg.js.d.ts index 8cb3252..99ec3b1 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -548,12 +548,12 @@ declare module "@svgdotjs/svg.js" { to(a: any): Morphable; } - type ListEachCallback = (el: T, index: number, list: T[]) => any + type ListEachCallback = (el: T, index: number, list: List) => any // List.js class List extends BuiltInArray implements ElementAlias { - each(fn: ListEachCallback): any[] - each(name: string, ...args: any[]): any[] + each(fn: ListEachCallback): List + each(name: string, ...args: any[]): List toArray(): T[] } @@ -1386,7 +1386,7 @@ declare module "@svgdotjs/svg.js" { // ForeignObject.js class ForeignObject extends Element { constructor(node: HTMLElement, attrs?: any) - add(element: Dom) : ForeignObject + add(element: Dom, attrs?: any) : ForeignObject } // image.js