Это на самом деле заметка для себя, но это может быть полезно для других.
Итак, вот 2 куска кода и мой вопрос в гиттере:
В чем разница между этими двумя?:
@Effect()
loadRegistrationsFailed$: Observable<Action> = this.actions$
.ofType(registrations.LOAD_FAIL)
.pipe(
map(
action =>
new ShowErrorDialogAction({
correlationId: new Guid(),
title: "Server is unreachable",
message:
"Can't load user registrations. Can't connect to the server"
})
)
);
```
and
```
@Effect()
loadRegistrationsFailed$: Observable<Action> = this.actions$
.ofType(registrations.LOAD_FAIL)
.pipe(action =>
of(
new ShowErrorDialogAction({
correlationId: new Guid(),
title: "Server is unreachable",
message:
"Can't load user registrations. Can't connect to the server"
})
)
);