@@ -12,6 +12,8 @@ export namespace dia {
12
12
13
13
type Event = JQuery . TriggeredEvent ;
14
14
15
+ type ObjectHash = { [ key : string ] : any } ;
16
+
15
17
type Point = g . PlainPoint ;
16
18
17
19
type BBox = g . PlainRect ;
@@ -157,7 +159,7 @@ export namespace dia {
157
159
}
158
160
}
159
161
160
- class Graph < A = Graph . Attributes , S = dia . ModelSetOptions > extends Backbone . Model < A , S > {
162
+ class Graph < A extends ObjectHash = Graph . Attributes , S = dia . ModelSetOptions > extends Backbone . Model < A , S > {
161
163
162
164
constructor ( attributes ?: Graph . Attributes , opt ?: { cellNamespace ?: any , cellModel ?: typeof Cell } ) ;
163
165
@@ -314,7 +316,7 @@ export namespace dia {
314
316
}
315
317
}
316
318
317
- class Cell < A = Cell . Attributes , S = dia . ModelSetOptions > extends Backbone . Model < A , S > {
319
+ class Cell < A extends ObjectHash = Cell . Attributes , S extends Backbone . ModelSetOptions = dia . ModelSetOptions > extends Backbone . Model < A , S > {
318
320
319
321
constructor ( attributes ?: A , opt ?: Graph . Options ) ;
320
322
@@ -485,7 +487,7 @@ export namespace dia {
485
487
}
486
488
}
487
489
488
- class Element < A = Element . Attributes , S = dia . ModelSetOptions > extends Cell < A , S > {
490
+ class Element < A extends ObjectHash = Element . Attributes , S extends Backbone . ModelSetOptions = dia . ModelSetOptions > extends Cell < A , S > {
489
491
490
492
isElement ( ) : boolean ;
491
493
@@ -608,7 +610,7 @@ export namespace dia {
608
610
}
609
611
}
610
612
611
- class Link < A = Link . Attributes , S = dia . ModelSetOptions > extends Cell < A , S > {
613
+ class Link < A extends ObjectHash = Link . Attributes , S extends Backbone . ModelSetOptions = dia . ModelSetOptions > extends Cell < A , S > {
612
614
613
615
toolMarkup : string ;
614
616
doubleToolMarkup ?: string ;
@@ -1816,7 +1818,7 @@ export namespace dia {
1816
1818
}
1817
1819
}
1818
1820
1819
- class HighlighterView < Options = HighlighterView . Options > extends mvc . View < undefined , SVGElement > {
1821
+ class HighlighterView < Options extends mvc . ViewOptions < undefined , SVGElement > = HighlighterView . Options > extends mvc . View < undefined , SVGElement > {
1820
1822
1821
1823
constructor ( options ?: Options ) ;
1822
1824
@@ -2015,7 +2017,7 @@ export namespace highlighters {
2015
2017
}
2016
2018
}
2017
2019
2018
- class list < Item = any , Options = list . Options > extends dia . HighlighterView < Options > {
2020
+ class list < Item = any , Options extends mvc . ViewOptions < undefined , SVGElement > = list . Options > extends dia . HighlighterView < Options > {
2019
2021
2020
2022
options : Options ;
2021
2023
@@ -2189,7 +2191,7 @@ export namespace shapes {
2189
2191
2190
2192
type CylinderAttributes = dia . Element . GenericAttributes < CylinderSelectors > ;
2191
2193
2192
- class Cylinder < S = dia . ModelSetOptions > extends dia . Element < CylinderAttributes , S > {
2194
+ class Cylinder < S extends Backbone . ModelSetOptions = dia . ModelSetOptions > extends dia . Element < CylinderAttributes , S > {
2193
2195
topRy ( ) : string | number ;
2194
2196
topRy ( t : string | number , opt ?: S ) : this;
2195
2197
}
@@ -3300,6 +3302,7 @@ export namespace mvc {
3300
3302
3301
3303
interface ViewOptions < T extends ( Backbone . Model | undefined ) , E extends Element = HTMLElement > extends Backbone . ViewOptions < T , E > {
3302
3304
theme ?: string ;
3305
+ [ key : string ] : any ;
3303
3306
}
3304
3307
3305
3308
interface viewEventData {
@@ -4136,7 +4139,7 @@ export namespace elementTools {
4136
4139
}
4137
4140
}
4138
4141
4139
- abstract class Control < T = Control . Options > extends dia . ToolView {
4142
+ abstract class Control < T extends mvc . ViewOptions < undefined , SVGElement > = Control . Options > extends dia . ToolView {
4140
4143
options : T ;
4141
4144
constructor ( opt ?: T ) ;
4142
4145
0 commit comments