diff options
author | Maxime AILLOUD <maxime.ailloud@gmail.com> | 2019-05-24 11:33:03 +0100 |
---|---|---|
committer | Maxime AILLOUD <maxime.ailloud@gmail.com> | 2019-05-24 11:33:03 +0100 |
commit | a3fbb02c754c7eb141dac220e05e5bef3e4184de (patch) | |
tree | d116a8fe7ce698bc761c0da2932c22a6b47632d0 /svg.js.d.ts | |
parent | 6c7a7a02a7d6e90d5d5a7606cd4c8355cdae0fe5 (diff) | |
download | svg.js-a3fbb02c754c7eb141dac220e05e5bef3e4184de.tar.gz svg.js-a3fbb02c754c7eb141dac220e05e5bef3e4184de.zip |
Typescript definition file: add null as possible parameter for event binding methods in Element class
Diffstat (limited to 'svg.js.d.ts')
-rw-r--r-- | svg.js.d.ts | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/svg.js.d.ts b/svg.js.d.ts index f35ce56..93e644d 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -1183,7 +1183,7 @@ declare module "@svgdotjs/svg.js" { before(element: Element): Element;
center(x: number, y: number): this;
classes(): string[];
- click(cb: Function): this;
+ click(cb: Function | null): this;
clipper(): ClipPath;
clipWith(element: Element): this;
clone(): this;
@@ -1195,7 +1195,7 @@ declare module "@svgdotjs/svg.js" { data(name: string, value: any, sustain?: boolean): this;
data(name: string): any;
data(val: Object): this;
- dblclick(cb: Function): this;
+ dblclick(cb: Function | null): this;
defs(): Defs;
dmove(x: NumberAlias, y: NumberAlias): this;
dx(x: NumberAlias): this;
@@ -1237,11 +1237,11 @@ declare module "@svgdotjs/svg.js" { matrix(mat: MatrixAlias, b?: number, c?: number, d?: number, e?: number, f?: number): this;
matrixify(): Matrix;
memory(): Object;
- mousedown(cb: Function): this;
- mousemove(cb: Function): this;
- mouseout(cb: Function): this;
- mouseover(cb: Function): this;
- mouseup(cb: Function): this;
+ mousedown(cb: Function | null): this;
+ mousemove(cb: Function | null): this;
+ mouseout(cb: Function | null): this;
+ mouseover(cb: Function | null): this;
+ mouseup(cb: Function | null): this;
move(x: NumberAlias, y: NumberAlias): this;
native(): LinkedHTMLElement;
next(): Element;
@@ -1301,11 +1301,11 @@ declare module "@svgdotjs/svg.js" { toggleClass(name: string): this;
toParent(parent: Dom): this;
toSvg(): this;
- touchcancel(cb: Function): this;
- touchend(cb: Function): this;
- touchleave(cb: Function): this;
- touchmove(cb: Function): this;
- touchstart(cb: Function): this;
+ touchcancel(cb: Function | null): this;
+ touchend(cb: Function | null): this;
+ touchleave(cb: Function | null): this;
+ touchmove(cb: Function | null): this;
+ touchstart(cb: Function | null): this;
transform(): MatrixExtract;
transform(t: MatrixAlias, relative?: boolean): this;
translate(x: number, y: number): this;
@@ -1332,7 +1332,7 @@ declare module "@svgdotjs/svg.js" { class Circle extends Shape implements CircleMethods {
constructor(node?: SVGCircleElement);
constructor(attr: CircleAttr)
-
+
node: SVGCircleElement;
rx(rx: number): this;
@@ -1458,7 +1458,7 @@ declare module "@svgdotjs/svg.js" { class Path extends Shape {
constructor(attr: PathAttr)
constructor(node?: SVGPathElement);
-
+
node: SVGPathElement;
morphArray: PathArray;
@@ -1659,4 +1659,4 @@ declare module "@svgdotjs/svg.js" { morph(x: number, y: number, width: number, height: number): ViewBox;
at(pos: number): ViewBox;
}
-}
\ No newline at end of file +}
|