Skip to content

Commit

Permalink
Update inaccurate example to 'of' replacement. (#6939)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
snesin committed Apr 23, 2022
1 parent d279670 commit 11c609b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs_app/content/deprecations/scheduler-argument.md
Expand Up @@ -37,7 +37,7 @@ Following code example demonstrate this process.
import { of, asyncScheduler, scheduled } from 'rxjs';

// Deprecated approach
of([1, 2, 3], asyncScheduler).subscribe((x) => console.log(x));
of(1, 2, 3, asyncScheduler).subscribe((x) => console.log(x));
// suggested approach
scheduled([1, 2, 3], asyncScheduler).subscribe((x) => console.log(x));
```
Expand Down

0 comments on commit 11c609b

Please sign in to comment.