Last active
October 30, 2022 13:49
-
-
Save NetanelBasal/ac7f6e3e6fe6ce935e72aade00f6a0f5 to your computer and use it in GitHub Desktop.
Revisions
-
NetanelBasal revised this gist
Oct 30, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export class FooService { .pipe( // πππ repeat({ delay: (count) => timer(count * 1000) }), filter((res) => res.status === 'completed'), take(1) ) } -
NetanelBasal created this gist
Oct 30, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ import { repeat, filter, take, timer } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class FooService { private http = inject(HttpClient); doSometing(data) { return this.http.post('https://foo', data) .pipe( // πππ repeat({ delay: (count) => timer(count * 1000) }), filter((res) => res.success), take(1) ) } }