+ typings for angular-throttle

This commit is contained in:
Stefan Steinhart
2015-07-02 21:26:28 +02:00
parent d73cbcb405
commit eb2d3502ca
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;
}
}