diff options
author | pragdave <dave@pragdave.me> | 2020-05-30 19:31:32 -0500 |
---|---|---|
committer | pragdave <dave@pragdave.me> | 2020-05-30 19:31:32 -0500 |
commit | 8383e46f0b8b8b9f7908716cee102bf63d3d2056 (patch) | |
tree | 90949710920a8ba13cd2085bdf24ea4d6ee951f0 /svg.js.d.ts | |
parent | d9d620fc3e92da83a75449eff78a01b66152b0d2 (diff) | |
download | svg.js-8383e46f0b8b8b9f7908716cee102bf63d3d2056.tar.gz svg.js-8383e46f0b8b8b9f7908716cee102bf63d3d2056.zip |
Fix up List (maybe). ForeignObject still open for discussion
Diffstat (limited to 'svg.js.d.ts')
-rw-r--r-- | svg.js.d.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/svg.js.d.ts b/svg.js.d.ts index 213828f..8cb3252 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -548,15 +548,12 @@ declare module "@svgdotjs/svg.js" { to(a: any): Morphable;
}
- type ListEachCallback<T> = (el: T, index: number, list: T[]) => T
+ type ListEachCallback<T> = (el: T, index: number, list: T[]) => any
// List.js
- class List<T> extends BuiltInArray<T> {
- // I have no clue how to deal with this
- // [key: string]: (...arg0: any[]) => List<T>
- // [key: string]: () => List<any>
- each(fn: ListEachCallback<T>): T[]
- each(...args: any[]): T[]
+ class List<T> extends BuiltInArray<T> implements ElementAlias {
+ each(fn: ListEachCallback<T>): any[]
+ each(name: string, ...args: any[]): any[]
toArray(): T[]
}
|