Creating an AngularJS interceptor using TypeScript