1.1.9 • Published 5 years ago

aop_pattern v1.1.9

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Index

Version changes

  • 1.1.9 promise bug
  • 1.1.6 corrected typescript issues
  • 1.1.2 js builder
  • 1.1.0 Extra parameters for external management
  • 1.0.1 Small changes on package.json providing much detailed information
  • 1.0.0 Initial release

Example

class loggerWorker extends AopWorker {
    public start(methodName: string, _arguments: any): void {
      console.debug('start', methodName, _arguments);
    }
    public exception(methodName: string, _arguments: any, exception: string): void {
      console.warn('exception', methodName, _arguments, exception);
    }
    public end(methodName: string, _arguments: any, ret?: any): void {
      console.debug('end', methodName, _arguments, ret);
    }
}

class Whatever extends Aop<loggerWorker> {
   constructor(...) {
     Super(loggerWorker, Whatever.name);
     ...
   }

   public methodSomething(...): ... {
     return this._intereceptMethod(this.methodSomething.name, arguments, () => {
       ...
     });
   }

   public async methodSomething2(...): Promise<...> {
     return this._intereceptPromise(this.methodSomething2.name, arguments, new Promise(
       ...
     ));
   }
}
1.1.9

5 years ago

1.1.8

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago