Created
August 15, 2019 12:54
-
-
Save jeserkin/73958aca8ae9644763f84b247a8e3ecb to your computer and use it in GitHub Desktop.
This file contains 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 characters
export class Bungo { | |
constructor(private service1: Sevice1, | |
private service2: Sevice2) { | |
} | |
findAllRowsBasedOnOtherRows(otherRows: string[]): string[] { | |
this.service1.findAllRows$() | |
.pipe( | |
flatMap((service1Rows: Service1Row[]) => { | |
return this.service2.finalAllRows$() | |
.pipe( | |
// filtering | |
map((/* some _input from previous operation/s */) => service1Rows.map(/* do something here based on _input */)) | |
) | |
}) | |
) | |
.subscribe((service1Rows: Service1Row[]) => { | |
// Ta da! Mutated Service1Rows[] based on some additional requested information | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment