In CustomDecorator, how to access a service instance defined in Nest.js?
export const CustomDecorator = (): MethodDecorator => {
return (
target: Object,
propertyKey: string | symbol,
descriptor: PropertyDescriptor
) => {
// Here, is possibile to access a Nest.js service (i.e. TestService) instance?
return descriptor;
}
};
from In Nest.js, how to get a service instance inside a decorator?
No comments:
Post a Comment