Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 5f85629

Browse files
committed
Fix example in scheduler.md
1 parent 58d31bd commit 5f85629

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

doc/api/schedulers/scheduler.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The follow example shows the basic usage of an `Rx.Scheduler`.
99
```js
1010
var disposable = Rx.Scheduler.timeout.scheduleWithState(
1111
'world',
12-
function (x) {
12+
function (scheduler, x) {
1313
console.log('hello ' + x);
1414
}
1515
);
@@ -82,7 +82,7 @@ function schedule(state, action) {
8282
}
8383
}, 0);
8484

85-
return new CompositeDisposable(disposable, disposableCreate(function () {
85+
return new Rx.CompositeDisposable(disposable, Rx.Disposable.create(function () {
8686
clearMethod(id);
8787
}));
8888
}
@@ -262,7 +262,7 @@ Schedules an action to be executed with state.
262262
#### Example
263263
264264
```js
265-
var disposable = Rx.Scheduler.immediate.scheduleWithState('world', function (x) {
265+
var disposable = Rx.Scheduler.immediate.scheduleWithState('world', function (scheduler, x) {
266266
console.log('hello ' + x);
267267
});
268268

@@ -328,7 +328,7 @@ Schedules an action to be executed at the specified absolute due time. Note this
328328
var disposable = Rx.Scheduler.timeout.scheduleWithAbsoluteAndState(
329329
'world',
330330
Date.now() + 5000, /* 5 seconds in the future */
331-
function (x) {
331+
function (scheduler, x) {
332332
console.log('hello ' + x);
333333
}
334334
);
@@ -392,7 +392,7 @@ Schedules an action to be executed at the specified relative due time. Note this
392392
var disposable = Rx.Scheduler.timeout.scheduleWithRelativeAndState(
393393
'world',
394394
5000, /* 5 seconds in the future */
395-
function (x) {
395+
function (scheduler, x) {
396396
console.log('hello ' + x);
397397
}
398398
);
@@ -741,7 +741,7 @@ console.log(r1);
741741
// => 0
742742

743743
var r2 = Rx.Scheduler.normalize(255);
744-
console.log(r1);
744+
console.log(r2);
745745
// => 255
746746
```
747747
@@ -764,7 +764,7 @@ var scheduler = Rx.Scheduler.currentThread;
764764

765765
var disposable = scheduler.scheduleWithState(
766766
'world',
767-
function (x) {
767+
function (scheduler, x) {
768768
console.log('hello ' + x);
769769
});
770770

@@ -825,7 +825,7 @@ var scheduler = Rx.Scheduler.timeout;
825825

826826
var disposable = scheduler.scheduleWithState(
827827
0,
828-
function (x) {
828+
function (scheduler, x) {
829829
console.log(x);
830830
}
831831
);

0 commit comments

Comments
 (0)