strings$: Observable<string[]> = of(["test", "test2", "test3"]); private result: string[] = []; constructor() { this.strings$.pipe(tap(res => this.result = res));