2018-06-28 21:34:41 +00:00
|
|
|
import * as plugins from './tapbundle.plugins';
|
2017-07-05 15:57:28 +00:00
|
|
|
|
|
|
|
export interface ITapWrapFunction {
|
2018-06-28 21:34:41 +00:00
|
|
|
(): Promise<any>;
|
2017-07-05 15:57:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export class TapWrap {
|
2018-06-28 21:34:41 +00:00
|
|
|
wrapFunction: ITapWrapFunction;
|
2017-07-05 22:06:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* the constructor
|
|
|
|
*/
|
2018-06-28 21:34:41 +00:00
|
|
|
constructor(wrapFunctionArg: ITapWrapFunction) {
|
2017-07-05 15:57:28 +00:00
|
|
|
// nothing here
|
2018-06-28 21:34:41 +00:00
|
|
|
this.wrapFunction = wrapFunctionArg;
|
2017-07-05 22:06:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* run the wrapFunction
|
|
|
|
*/
|
2018-06-28 21:34:41 +00:00
|
|
|
async run() {
|
|
|
|
await this.wrapFunction();
|
2017-07-05 15:57:28 +00:00
|
|
|
}
|
|
|
|
}
|