nestjs-aop
Version:
<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/toss/nestjs-aop"> <img src="https://toss.tech/wp-content/uploads/2022/11/tech-article-nest-js-02.png" alt="Logo" height="200"> </a>
36 lines (31 loc) • 853 B
text/typescript
import { Injectable } from '@nestjs/common';
import { Foo, NotAopFoo, SetOriginalTrue } from './foo.decorator';
()
export class FooService {
({ options: 'options' })
()
foo(arg1: string, arg2: number) {
return arg1 + arg2;
}
({ options: '0' })
({ options: '1' })
({ options: '2' })
({ options: '3' })
({ options: '4' })
({ options: '5' })
({ options: '6' })
({ options: '7' })
multipleDecorated(arg1: string, arg2: number) {
return arg1 + arg2;
}
async getFoo(id: number) {
await new Promise((resolve) => setTimeout(resolve, 1000));
return 'foo' + id;
}
({ options: '1' })
thisTest() {
// eslint-disable-next-line @typescript-eslint/no-this-alias
fooThisValue = this;
}
}
export let fooThisValue: any;