Simplify filterfunction using interface instead of silly type

This commit is contained in:
Oscar Busk
2018-06-28 22:21:06 +02:00
parent f6a902f8ce
commit 4ef49ba480
2 changed files with 7 additions and 7 deletions

View File

@@ -220,7 +220,7 @@ mod.filter({
name1(foo: any) { return () => {}; },
name2: ['foo', (foo: any) => () => {}],
});
const customStatefulFilter: ng.FilterFunction<(s: string) => number> = (s) => 1;
const customStatefulFilter: ng.IFilterFunction = (s) => 1;
mod.filter('name', () => customStatefulFilter);
mod.filter('name', ['$scope', () => customStatefulFilter]);
mod.filter({