I have the following interceptor:
"use strict";
import { IApiService } from '../services/api';
import { ISessionService } from '../services/session';
import { IRedirectService } from '../services/redirect';
export default class ApiInterceptor {
constructor(
private $q: ng.IQService,
private ApiService: IApiService,
private SessionService: ISessionService,
private RedirectService: IRedirectService) { }
...
}
This is how it's set as a Service:
import ApiInterceptor from './interceptors/api';
...
export default angular.module('app.core', [
'toastr', 'js-data'
])
// Constants
.constant('config', config)
// Config
.config(DataConfig)
// Filters
...
// Interceptors
.service('ApiInterceptor', ApiInterceptor);
Then in my app.instance I set app.core as dep:
'use strict';
import '../app.core/module';
...
export default angular.module('app.instance', [
...
'app.core',
...]);
And use its code here:
'use strict';
import '../../app.core/module';
...
export default function ConfigApp($httpProvider, $locationProvider, $analyticsProvider): void {
...
$httpProvider.interceptors.push('ApiInterceptor');
...
}
Then I get this error:
Uncaught TypeError: Cannot read property 'prototype' of undefined
This the information I get from debugger:
Going up the Call Stack:
Any ideas? I've been beating my head against the wall since yesterday... Thanks!
EDIT:
Here's a service example:
.service('LogService', LogService)
This is the implementation:
"use strict";
export interface ILogService {
debug(...args: any[]): void;
info(...args: any[]): void;
warn(...args: any[]): void;
error(...args: any[]): void;
deprecated(...args: any[]): void;
enableDebug(flag: boolean): void;
enableConsole(flag: boolean): void;
}
/**
* Provides logging support.
*/
export default class LogService implements ILogService {
static debugEnabled: boolean = false;
static consoleEnabled: boolean = true;
constructor(
private $log: any,
private $window: ng.IWindowService) { }
I get the same error...

