Files
zitadel/console/src/app/utils/pairwiseStartWith.ts
T
3042bbb993 feat: Use V2 API's in Console (#9312)
# Which Problems Are Solved
Solves #8976

# Additional Changes
I have done some intensive refactorings and we are using the new
@zitadel/client package for GRPC access.

# Additional Context
- Closes #8976

---------

Co-authored-by: Max Peintner <[email protected]>
2025-02-17 19:25:46 +01:00

12 lines
308 B
TypeScript

import { Observable } from 'rxjs';
import { map, pairwise, startWith } from 'rxjs/operators';
export function pairwiseStartWith<T, R>(start: T) {
return (source: Observable<R>) =>
source.pipe(
startWith(start),
pairwise(),
map(([prev, curr]) => [prev, curr] as [T | R, R]),
);
}