rxjs#SubscriptionLike TypeScript Examples
The following examples show how to use
rxjs#SubscriptionLike.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: notification.service.ts From etherspot-sdk with MIT License | 6 votes |
private createGraphQLSubscription(address: string): SubscriptionLike {
const { apiService } = this.services;
const observable = apiService.subscribe<{
notification: AnyNotification;
}>(
gql`
subscription($chainId: Int, $address: String!) {
notification: newNotification(chainId: $chainId, address: $address) {
type
recipient
payload
}
}
`,
{
variables: {
address,
},
models: {
notification: AnyNotification,
},
},
);
return observable
.map(({ notification }) => notification)
.subscribe((notification) => {
this.notification$.next(notification);
});
}
Example #2
Source File: notification.service.ts From etherspot-sdk with MIT License | 5 votes |
private walletSubscription: SubscriptionLike = null;
Example #3
Source File: notification.service.ts From etherspot-sdk with MIT License | 5 votes |
private accountSubscription: SubscriptionLike = null;
Example #4
Source File: DescentController.ts From coronavirus-pop-phaser with MIT License | 5 votes |
private subscriptions: SubscriptionLike[] = []
Example #5
Source File: SoundEffectsController.ts From coronavirus-pop-phaser with MIT License | 5 votes |
private subscriptions: SubscriptionLike[] = []
Example #6
Source File: GameUI.ts From coronavirus-pop-phaser with MIT License | 5 votes |
private subscriptions: SubscriptionLike[] = []