@@ -4,18 +4,18 @@ export const bufferToggle: OperatorDoc = {
44 name : 'bufferToggle' ,
55 operatorType : 'transformation' ,
66 signature : `bufferToggle(
7- openings: SubscribableOrPromise<O> ,
8- closingSelector: (value: O ) => SubscribableOrPromise): Observable<T[]> ` ,
7+ openings: SubscribableOrPromise,
8+ closingSelector: (value) => SubscribableOrPromise): Observable` ,
99 parameters : [
1010 {
1111 name : 'openings' ,
12- type : 'SubscribableOrPromise<O> ' ,
12+ type : 'SubscribableOrPromise' ,
1313 attribute : '' ,
1414 description : `A Subscribable or Promise of notifications to start new buffers.`
1515 } ,
1616 {
1717 name : 'closingSelector' ,
18- type : '(value: O ) => SubscribableOrPromise' ,
18+ type : '(value) => SubscribableOrPromise' ,
1919 attribute : '' ,
2020 description : `A function that takes the value emitted by the openings observable
2121 and returns a Subscribable or Promise, which, when it emits, signals that the associated buffer should be emitted and cleared.`
@@ -53,6 +53,7 @@ export const bufferToggle: OperatorDoc = {
5353 const buffered = clicks.pipe(
5454 bufferToggle(openings, i => i % 2 ? interval(500) : empty())
5555 );
56+ buffered.subscribe(x => console.log(x));
5657 /*
5758 Expected console output:
5859
@@ -73,11 +74,10 @@ export const bufferToggle: OperatorDoc = {
7374
7475 []
7576 */
76- buffered.subscribe(x => console.log(x));
7777 ` ,
7878 externalLink : {
7979 platform : 'JSBin' ,
80- url : 'http://jsbin.com/nuriyod/3 /embed?js,console,output'
80+ url : 'http://jsbin.com/nuriyod/6 /embed?js,console,output'
8181 }
8282 } ,
8383 {
@@ -94,6 +94,8 @@ export const bufferToggle: OperatorDoc = {
9494 const buffered = clicks.pipe(
9595 bufferToggle(openings, _ => closing)
9696 );
97+ buffered.subscribe(x => console.log(x));
98+
9799 /*
98100 Expected console output:
99101
@@ -126,14 +128,11 @@ export const bufferToggle: OperatorDoc = {
126128 x: 143,
127129 y: 136
128130 }]
129-
130131 */
131-
132- buffered.subscribe(x => console.log(x));
133132` ,
134133 externalLink : {
135134 platform : 'JSBin' ,
136- url : 'http://jsbin.com/vurobel/11 /embed?js,console,output'
135+ url : 'http://jsbin.com/vurobel/12 /embed?js,console,output'
137136 }
138137 }
139138 ] ,
0 commit comments