Merge pull request #1378 from jzarnikov/master

raphael - made types of dom-elements more specific
This commit is contained in:
Masahiro Wakame 2013-12-05 03:56:55 -08:00
commit bcaefb2b37
2 changed files with 14 additions and 12 deletions

View File

@ -53,7 +53,7 @@ interface RaphaelElement {
mouseover(handler: Function): RaphaelElement;
mouseup(handler: Function): RaphaelElement;
next: RaphaelElement;
node: Element;
node: SVGElement;
onDragOver(f: Function): RaphaelElement;
paper: RaphaelPaper;
pause(anim?: RaphaelAnimation): RaphaelElement;
@ -195,10 +195,10 @@ interface RaphaelMatrix {
interface RaphaelPaper {
add(JSON): RaphaelSet;
bottom: RaphaelElement;
canvas: Element;
canvas: SVGSVGElement;
circle(x: number, y: number, r: number): RaphaelElement;
clear();
defs: Element;
defs: SVGDefsElement;
ellipse(x: number, y: number, rx: number, ry: number): RaphaelElement;
forEach(callback: number, thisArg: any): RaphaelStatic;
getById(id: number): RaphaelElement;

View File

@ -1,6 +1,6 @@
// Type definitions for tween.js r7
// Type definitions for tween.js r12
// Project: https://github.com/sole/tween.js/
// Definitions by: https://github.com/sunetos
// Definitions by: https://github.com/sunetos and https://github.com/jzarnikov
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module TWEEN {
@ -9,7 +9,7 @@ declare module TWEEN {
export function removeAll(): void;
export function add(tween:Tween): void;
export function remove(tween:Tween): void;
export function update(time:number): boolean;
export function update(time?:number): boolean;
export class Tween {
constructor(object?:any);
@ -17,13 +17,15 @@ declare module TWEEN {
start(time?:number): Tween;
stop(): Tween;
delay(amount:number): Tween;
easing(easing): Tween;
interpolation(interpolation:Function): Tween;
easing(easing: (k: number) => number): Tween;
interpolation(interpolation: (v:number[], k:number) => number): Tween;
chain(...tweens:Tween[]): Tween;
onStart(callback:Function): Tween;
onUpdate(callback:Function): Tween;
onComplete(callback:Function): Tween;
update(time: number): boolean;
onStart(callback: (object?: any) => void): Tween;
onUpdate(callback: (object?: any) => void): Tween;
onComplete(callback: (object?: any) => void): Tween;
update(time: number): boolean;
repeat(times: number): Tween;
yoyo(enable: boolean): Tween;
}
export var Easing: TweenEasing;
export var Interpolation: TweenInterpolation;