mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Merge pull request #18976 from yWorks/yfiles-2.0.1.2
Updated type definitions for yFiles for HTML 2.0.1.2
This commit is contained in:
Vendored
+6730
-5907
File diff suppressed because it is too large
Load Diff
@@ -129,9 +129,23 @@ class BasicTest {
|
||||
var args = new yfiles.lang.EventArgs();
|
||||
yfiles.input.KeyEventRecognizers.META_PRESSED(null, args);
|
||||
}
|
||||
|
||||
testsForVersion2012() {
|
||||
//isInstance type-guard
|
||||
let r : any;
|
||||
let p : any;
|
||||
if(yfiles.geometry.Rect.isInstance(r) && yfiles.geometry.Point.isInstance(p)) {
|
||||
r.contains(p);
|
||||
}
|
||||
|
||||
//Typings for yfiles.lang.Object instance methods.
|
||||
let r2 : yfiles.geometry.Rect = new yfiles.geometry.Rect(0,0,100,100);
|
||||
let r3 : yfiles.geometry.Rect = new yfiles.geometry.Rect(0,0,100,100);
|
||||
r2.equals(r3);
|
||||
}
|
||||
}
|
||||
|
||||
class MyHitTestable extends yfiles.lang.BaseClass<Object>(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable {
|
||||
class MyHitTestable extends yfiles.lang.BaseClass(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable {
|
||||
isHit(ctx:yfiles.input.IInputModeContext, p:yfiles.geometry.Point):boolean {
|
||||
return false;
|
||||
}
|
||||
@@ -143,3 +157,19 @@ class MyNodeStyle extends yfiles.styles.NodeStyleBase {
|
||||
return new yfiles.view.SvgVisual(g);
|
||||
}
|
||||
}
|
||||
|
||||
// tests for version 2.0.1.2
|
||||
|
||||
// parameterless baseclass call.
|
||||
class MyHitTestable2 extends yfiles.lang.BaseClass(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable {
|
||||
isHit(context: yfiles.input.IInputModeContext, location: yfiles.geometry.Point): boolean {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// yfiles.lang.Object as baseclass.
|
||||
class MyHitTestable3 extends yfiles.lang.BaseClass<yfiles.lang.Object>(yfiles.input.IHitTestable) implements yfiles.input.IHitTestable {
|
||||
isHit(context: yfiles.input.IInputModeContext, location: yfiles.geometry.Point): boolean {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user