@@ -26,15 +26,15 @@ import * as types from './types';
2626 * Maps a name (key) representing a internal file module and its exports
2727 */
2828export type ModuleExportsMapping = {
29- // tslint:disable:no-any
29+ // tslint:disable-next-line :no-any
3030 [ key : string ] : any ;
3131} ;
3232
3333
3434/** This class represent the base to patch plugin. */
3535export abstract class BasePlugin implements types . Plugin {
3636 /** Exports from the nodejs module to be instrumented */
37- // tslint:disable:no-any
37+ // tslint:disable-next-line :no-any
3838 protected moduleExports : any ;
3939 /** The module name */
4040 protected moduleName : string ;
@@ -66,8 +66,8 @@ export abstract class BasePlugin implements types.Plugin {
6666 * @param version module version description
6767 * @param basedir module absolute path
6868 */
69- // tslint:disable:no-any
7069 private setPluginContext (
70+ // tslint:disable-next-line:no-any
7171 moduleExports : any , tracer : modelTypes . Tracer , version : string ,
7272 basedir ?: string ) {
7373 this . moduleExports = moduleExports ;
@@ -78,7 +78,6 @@ export abstract class BasePlugin implements types.Plugin {
7878 this . internalFilesExports = this . loadInternalFiles ( ) ;
7979 }
8080
81-
8281 /**
8382 * Method that enables the instrumentation patch.
8483 *
@@ -91,9 +90,9 @@ export abstract class BasePlugin implements types.Plugin {
9190 * @param version version of the current instaled module to patch
9291 * @param basedir module absolute path
9392 */
94- enable (
95- // tslint:disable:no-any
96- moduleExports : any , tracer : modelTypes . Tracer , version : string ,
93+ enable < T > (
94+ // tslint:disable-next-line :no-any
95+ moduleExports : T , tracer : modelTypes . Tracer , version : string ,
9796 basedir : string ) {
9897 this . setPluginContext ( moduleExports , tracer , version , basedir ) ;
9998 return this . applyPatch ( ) ;
@@ -108,10 +107,10 @@ export abstract class BasePlugin implements types.Plugin {
108107 * This method implements the GoF Template Method Pattern,
109108 * 'applyPatch' is the variant part, each instrumentation should
110109 * implement its own version, 'enable' method is the invariant.
111- * Wil be called when enable is called.
110+ * It will be called when enable is called.
112111 *
113112 */
114- // tslint:disable:no-any
113+ // tslint:disable-next-line :no-any
115114 protected abstract applyPatch ( ) : any ;
116115 protected abstract applyUnpatch ( ) : void ;
117116
0 commit comments