mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 14:31:57 +08:00
Updated type definitions for yFiles for HTML 2.0.1.2
This commit is contained in:
12637
types/yfiles/index.d.ts
vendored
12637
types/yfiles/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@@ -129,6 +129,20 @@ 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 {
|
||||
@@ -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