mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add types for $mdUtil (#34115)
This commit is contained in:
parent
92b0d5bb4e
commit
22e9e40427
@ -419,3 +419,14 @@ myApp.controller('StickyController', ($scope: TestScope, $mdSticky: ng.material.
|
||||
$mdSticky($scope, stickyElement);
|
||||
$mdSticky($scope, stickyElement, cloneStickyElement);
|
||||
});
|
||||
|
||||
function mdUtil($mdUtil: ng.material.IUtilService) {
|
||||
// $ExpectType void
|
||||
$mdUtil.enableScrolling();
|
||||
|
||||
// $ExpectType () => void
|
||||
$mdUtil.debounce(() => {});
|
||||
|
||||
// $ExpectType () => string
|
||||
$mdUtil.debounce((): string => "");
|
||||
}
|
||||
|
||||
6
types/angular-material/index.d.ts
vendored
6
types/angular-material/index.d.ts
vendored
@ -517,5 +517,11 @@ declare module 'angular' {
|
||||
getLastInteractionType(): string|null;
|
||||
isUserInvoked(checkDelay?: number): boolean;
|
||||
}
|
||||
|
||||
interface IUtilService {
|
||||
// tslint:disable-next-line:ban-types debounce takes in a user provided function
|
||||
debounce<T extends Function>(func: T, wait?: number, scope?: any, invokeApply?: boolean): T;
|
||||
enableScrolling(): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user