* Invoke the target method * @param ctx - Context object * @param target - Target class or object * @param methodName - Target method name * @param args - Arguments
( ctx: Context, // Not used target: object, methodName: string, args: InvocationArgs, )
| 249 | * @param args - Arguments |
| 250 | */ |
| 251 | function invokeTargetMethod( |
| 252 | ctx: Context, // Not used |
| 253 | target: object, |
| 254 | methodName: string, |
| 255 | args: InvocationArgs, |
| 256 | ): InvocationResult { |
| 257 | const targetWithMethods = target as Record<string, Function>; |
| 258 | /* istanbul ignore if */ |
| 259 | if (debug.enabled) { |
| 260 | debug('Invoking method %s', getTargetName(target, methodName), args); |
| 261 | } |
| 262 | // Invoke the target method |
| 263 | const result = targetWithMethods[methodName](...args); |
| 264 | /* istanbul ignore if */ |
| 265 | if (debug.enabled) { |
| 266 | debug('Method invoked: %s', getTargetName(target, methodName), result); |
| 267 | } |
| 268 | return result; |
| 269 | } |
no outgoing calls
no test coverage detected