I am facing an issue with a .ts file that contains the following code:
module App.Filters {
export class SplitRangeFilter implements ng.IFilterService {
static $inject = ['$filter'];
public static factory(): Function {
return (input: string, splitIndex: number) => {
return input.split('-')[splitIndex];
}
}
}
angular.module("App.Filters", []).filter('SplitRange', () => SplitRangeFilter.factory);
}
The compiler is giving me an error message stating:
Class SplitRangeFilter declared interface IFilterService but does not implement it: Types 'SplitRangeFilter' and 'IFilterService' have incompatible signatures. No matching signature for '<T>(name: string) => T'
I have checked the Angular documentation but could not find any information on this signature. Any suggestions on how to resolve this compiler error in VS2015?