I don't think this is possible, but given this:
interface
import {BrowserService} from "../services/browser/index";
export interface IPrimaryNavigation {
opts:IPrimaryNavigationOpts;
}
export interface IPrimaryNavigationOpts {
...
browserService:BrowserService;
...
}
class:
import {IPrimaryNavigation, IPrimaryNavigationOpts} from "./interface";
export class PrimaryNavigation implements IPrimaryNavigation {
public opts:IPrimaryNavigationOpts;
...
mounted():void {
...
this.listenForBootstrap(this.opts.bsNav, this.opts.browserService);
}
listenForBootstrap(menuName:string,browserService:<???>):void {
^^^ here is the problem -
// I want to do the equivalent of IPrimaryNavigationOpts.browserService but can't.
// I don't think I should have to import the IBrowserService explicitly.
}
}
How do you get around this issue. I can't seem to find any examples online that deal with such an issue. I admit I am very new to all of this, so pointers appreciated.