return function (target: Object,
propertyKey: string | symbol,
descriptor: TypedPropertyDescriptor<any>) {
const originValue = descriptor.value;
descriptor.value = function (...args) {
// тут this - это не ваш контекст, а непонятно что
return descriptorWrapper.call(this, "debug", originValue, options, propertyKey, args);
}//.bind(this) сюда;
return descriptor;
}
return this.authService.verifyToken(...).map(...)<b>.catch(...)</b>
: Observable<boolean> | Promise<boolean> | boolean
Observable<boolean>
, т.е. как-то так:return this.authService.foo().map(response => response.bar ? true : false );
arr.forEach( async function() {
await ....;
}
for (item of arr) {
let result = await ...;
}