add animationframe type definition file

This commit is contained in:
Qinfeng Chen
2015-01-15 17:06:20 -05:00
parent 2cc4331067
commit 7dc6f5e566
2 changed files with 21 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <reference path="animationframe.d.ts"/>
module AnimationFrameTests {
var animation = new AnimationFrame();
function frame() {
animation.request(frame);
}
animation.request(frame);
}
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for animation-frame 0.1.7
// Project: https://github.com/kof/animation-frame
// Definitions by: Qinfeng Chen <https://github.com/qinfchen>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface AnimationFrame {
new(): AnimationFrame;
request(callback: () => void): void;
}
declare var AnimationFrame: AnimationFrame;