now supports tap.wrap

This commit is contained in:
2017-07-06 00:06:18 +02:00
parent 15bbf7f10c
commit d22fc1b688
13 changed files with 121 additions and 25 deletions

View File

@@ -5,10 +5,20 @@ export interface ITapWrapFunction {
}
export class TapWrap {
asyncFunction: ITapWrapFunction
constructor(functionArg: ITapWrapFunction) {
wrapFunction: ITapWrapFunction
/**
* the constructor
*/
constructor (wrapFunctionArg: ITapWrapFunction) {
// nothing here
this.wrapFunction = wrapFunctionArg
}
/**
* run the wrapFunction
*/
async run () {
await this.wrapFunction()
}
}