I am dealing with a situation where I need to retrieve a value from this.parts$(def) which is chained to an observable triggering on an action event. Is there a way to avoid using setTimeout in order to obtain the result from this.parts$(def)?
getParts$ = (def: Def) => {
setTimeout(() => this.action.next('test'), 1);
return this.parts$(def);
};
Note: The 'action' is defined as:
private action = new Subject<string>();