Can an injected service be accessed from within a Class decorator?
I aim to retrieve the service in the personalized constructor:
function CustDec(constructor: Function) {
var original = constructor;
var f: any = function (...args) {
// How can I access the injectedService here?
// I have attempted things like this.injectedService but without success
return new original(...args);
}
f.prototype = target.prototype;
return f;
}
@CustDec
@Injectable()
class MyService {
constructor(
private readonly injectedService: InjectedService,
) {}
}