UNPKG

node-web-mvc

Version:
20 lines (19 loc) 767 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const AbstractMethodAdviceInterceptor_1 = __importDefault(require("./AbstractMethodAdviceInterceptor")); class MethodAfterReturningAdviceInterceptor extends AbstractMethodAdviceInterceptor_1.default { invokeAsyncSupport(invocation, v) { Promise.resolve(v).then((v) => { this.handler(invocation.getJoinPint(), v); }); } invoke(invocation) { const m = invocation.proceed(); this.invokeAsyncSupport(invocation, m); return m; } } exports.default = MethodAfterReturningAdviceInterceptor;