mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Merge pull request #4806 from reppners/angular-throttle
+ typings for angular-throttle
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user