From 201a0bc249864be25417b79434782bc582d76bb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20C=2E=20Paiva?= Date: Sun, 14 Jun 2020 10:11:31 +0100 Subject: [PATCH] Fix types for List and ForeignObject --- svg.js.d.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/svg.js.d.ts b/svg.js.d.ts index f826335..97000e9 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -555,13 +555,14 @@ declare module "@svgdotjs/svg.js" { to(a: any): Morphable; } - type ListEachCallback = (el: T, index: number, list: List) => any + type ListEachCallback = + (el: T, index: number, list: List) => any; // List.js - class List extends BuiltInArray { - each(fn: ListEachCallback): List - each(name: string, ...args: any[]): List - toArray(): T[] + class List extends BuiltInArray { + each(fn: ListEachCallback): List; + each(name: string, ...args: any[]): List; + toArray(): T[]; } class Eventobject { @@ -1405,9 +1406,9 @@ declare module "@svgdotjs/svg.js" { // ForeignObject.js class ForeignObject extends Element { - constructor(node?: SVGForeignObjectElement, attrs?: object) - constructor(attrs?: object) - add(element: Dom, i?: number): ForeignObject + constructor(node?: SVGForeignObjectElement, attrs?: object); + constructor(attrs?: object); + add(element: Dom, i?: number): this; } // image.js -- 2.39.5