From 0d2fb0d17a37d6ad11abb3bb0bbd361153bf19d0 Mon Sep 17 00:00:00 2001 From: Michal Kutil Date: Sun, 15 Dec 2013 23:04:05 +0100 Subject: [PATCH] jQuery: The interface used to specify easing functions add --- jquery/jquery-tests.ts | 5 +++++ jquery/jquery.d.ts | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts index 434cf2554f..0a935ce445 100644 --- a/jquery/jquery-tests.ts +++ b/jquery/jquery-tests.ts @@ -410,6 +410,11 @@ function test_animatedSelector() { animateIt(); } +function test_easing() { + var result: number = $.easing.linear(3); + var result: number = $.easing.swing(3); +} + function test_append() { $('.inner').append('

Test

'); $('.container').append($('h2')); diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index 2bd9beecc7..e68d50e366 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -348,6 +348,13 @@ interface JQueryEventConstructor { new (name: string, eventProperties?: any): JQueryEventObject; } +/** + * The interface used to specify easing functions. + */ +interface JQueryEasing { + linear(p: number): number; + swing(p: number): number; +} /* Static members of jQuery (those on $ and jQuery themselves) @@ -647,6 +654,7 @@ interface JQueryStatic { Animation(elem: any, properties: any, options: any): any; + easing: JQueryEasing; } /*