Merge pull request #4806 from reppners/angular-throttle

+ typings for angular-throttle
This commit is contained in:
Masahiro Wakame
2015-07-13 06:15:21 +09:00
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,8 @@
/// <reference path="angular.throttle.d.ts" />
/// <reference path='../angularjs/angular.d.ts' />
var throttledFn = angular.throttle(function (someArg:any) {
return someArg;
}, 100);
var result = throttledFn(10);
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for angular.throttle
// Project: https://github.com/BaggersIO/angular.throttle
// Definitions by: Stefan Steinhart <https://github.com/reppners>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path='../angularjs/angular.d.ts' />
declare module angular {
interface IAngularStatic {
throttle:( fn:Function, throttle:number, options?:{leading?:boolean; trailing?:boolean;} ) => Function;
}
}