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