In my Angular 2 TypeScript application, I defined an interface rather than a class to allow optional parameters.
As far as I know, I should somewhere implement the interface by:
export class myClass implements myInterface { ... }
and then instantiate it via new(...).
I wondered whether this is the right way to do it (in Angular 2) or there is a simpler / better way?
Also, where should I put the implementation, in the component (.ts) where I use it, where the interface is or where?