Skip to content

Commit 11c609b

Browse files
authored
Update inaccurate example to 'of' replacement. (#6939)
The arguments to 'of' should not be an array. When running the stackblitz, the output is: [1, 2, 3] 1 2 3 That is the 'of' emitting the array, and the scheduled emitting each item in the array separately; not the same thing.
1 parent d279670 commit 11c609b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs_app/content/deprecations/scheduler-argument.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Following code example demonstrate this process.
3737
import { of, asyncScheduler, scheduled } from 'rxjs';
3838

3939
// Deprecated approach
40-
of([1, 2, 3], asyncScheduler).subscribe((x) => console.log(x));
40+
of(1, 2, 3, asyncScheduler).subscribe((x) => console.log(x));
4141
// suggested approach
4242
scheduled([1, 2, 3], asyncScheduler).subscribe((x) => console.log(x));
4343
```

0 commit comments

Comments
 (0)