I'm trying to decorate async function#1 with some async function#2.
E.g.
function func2(param) {
return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
//make async operations and then return descriptor
}
@func2(param)
async function func1() {
await .... //some async operation
await .... //some async operation
}
So, the main idea is to perform some async operation in decorator, and then perform other async calls in the main function.
Is it possible to make this withing typescript decorators?
Thank you in advance.