Guest User

Untitled

a guest
Dec 11th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. class Service {}
  2.  
  3. function myFirstDecorator(constructor: Function) {
  4. console.log(constructor);
  5. }
  6.  
  7. @myFirstDecorator
  8. class Module {
  9. constructor(private service: Service) {}
  10. }
  11.  
  12. console.log(Reflect.getOwnMetadata('design:paramtypes', Module)); // будет массив `[Service]`
Add Comment
Please, Sign In to add comment