1
- import { OperatorDoc } from " ../operator.model" ;
1
+ import { OperatorDoc } from ' ../operator.model' ;
2
2
3
3
export const merge : OperatorDoc = {
4
- name : " merge" ,
5
- operatorType : " combination" ,
4
+ name : ' merge' ,
5
+ operatorType : ' combination' ,
6
6
signature :
7
- " public merge(other: ObservableInput, concurrent: number, scheduler: Scheduler): Observable" ,
7
+ ' public merge(other: ObservableInput, concurrent: number, scheduler: Scheduler): Observable' ,
8
8
parameters : [
9
9
{
10
- name : " other" ,
11
- type : " ObservableInput" ,
12
- attribute : "" ,
10
+ name : ' other' ,
11
+ type : ' ObservableInput' ,
12
+ attribute : '' ,
13
13
description : `An input Observable to merge with the source Observable. More than one input
14
14
Observables may be given as argument.`
15
15
} ,
16
16
{
17
- name : " concurrent" ,
18
- type : " number" ,
19
- attribute : " optional, default: Number.POSITIVE_INFINITY" ,
17
+ name : ' concurrent' ,
18
+ type : ' number' ,
19
+ attribute : ' optional, default: Number.POSITIVE_INFINITY' ,
20
20
description : `Maximum number of input Observables being subscribed to concurrently.`
21
21
} ,
22
22
{
23
- name : " scheduler" ,
24
- type : " Scheduler" ,
25
- attribute : " optional, default: null" ,
23
+ name : ' scheduler' ,
24
+ type : ' Scheduler' ,
25
+ attribute : ' optional, default: null' ,
26
26
description : `The IScheduler to use for managing concurrency of input Observables.`
27
27
}
28
28
] ,
29
- marbleUrl : " http://reactivex.io/rxjs/img/merge.png" ,
29
+ marbleUrl : ' http://reactivex.io/rxjs/img/merge.png' ,
30
30
shortDescription : {
31
31
description : `Creates an output Observable which concurrently emits all values
32
32
from every given input Observable. <span class="informal">Flattens multiple Observables
33
33
together by blending their values into one Observable.</span>`
34
34
} ,
35
35
walkthrough : {
36
36
description : `
37
- <p><code>Merge</code > subscribes to each given input Observable (either the source or an
37
+ <p><span class="markdown- code" >Merge</span > subscribes to each given input Observable (either the source or an
38
38
Observable given as argument), and simply forwards (without doing any
39
39
transformation) all the values from all the input Observables to the output
40
40
Observable. The output Observable only completes once all input Observables
@@ -44,20 +44,20 @@ export const merge: OperatorDoc = {
44
44
} ,
45
45
examples : [
46
46
{
47
- name : " Merge together two Observables: 1s interval and clicks" ,
47
+ name : ' Merge together two Observables: 1s interval and clicks' ,
48
48
code : `
49
49
const clicks = Rx.Observable.fromEvent(document, 'click');
50
50
const timer = Rx.Observable.interval(1000);
51
51
const clicksOrTimer = clicks.merge(timer);
52
52
clicksOrTimer.subscribe(x => console.log(x));
53
53
` ,
54
54
externalLink : {
55
- platform : " JSBin" ,
56
- url : " http://jsbin.com/wihafapiva/1/edit ?js,output"
55
+ platform : ' JSBin' ,
56
+ url : ' http://jsbin.com/wihafapiva/1/embed ?js,output'
57
57
}
58
58
} ,
59
59
{
60
- name : " Merge together 3 Observables, but only 2 run concurrently" ,
60
+ name : ' Merge together 3 Observables, but only 2 run concurrently' ,
61
61
code : `
62
62
const timer1 = Rx.Observable.interval(1000).take(10);
63
63
const timer2 = Rx.Observable.interval(2000).take(6);
@@ -67,10 +67,10 @@ export const merge: OperatorDoc = {
67
67
merged.subscribe(x => console.log(x));
68
68
` ,
69
69
externalLink : {
70
- platform : " JSBin" ,
71
- url : " http://jsbin.com/midosuqaga/1/edit ?js,output"
70
+ platform : ' JSBin' ,
71
+ url : ' http://jsbin.com/midosuqaga/1/embed ?js,output'
72
72
}
73
73
}
74
74
] ,
75
- relatedOperators : [ " mergeAll" , " mergeMap" , " mergeMapTo" , " mergeScan" ]
75
+ relatedOperators : [ ' mergeAll' , ' mergeMap' , ' mergeMapTo' , ' mergeScan' ]
76
76
} ;
0 commit comments