Я пытаюсь вызвать функцию журнала, которая находится в документе, используя перехватчик в LoopBack 4, как показано ниже;
@intercept(log) // `log` is an interceptor function
export class PingController {
}
функция журнала в LoopBack 4 docs
const log: Interceptor = async (invocationCtx, next) => {
console.log('log: before-' + invocationCtx.methodName);
// Wait until the interceptor/method chain returns
const result = await next();
console.log('log: after-' + invocationCtx.methodName);
return result;
};
НоЯ получаю сообщение об ошибке;
не удается найти имя Interceptor
Что я делаю не так и как я могу это исправить?