Commit 865d8d7
fix(subscribable): make subscribe() signature match Observable (#4050)
* fix(subscribable): make subscribe() signature match Observable
Fixes #3891
* test: cast string | number to string before concatenating
T of this Observable is string | number, so TypeScript does not allow
using +. The desired behaviour for this function is to concatenate the
string values, so cast to strings. On master, these were incorrectly
inferred as never, which is why this error was not surfaced.
* test: correct type for selector function
The hot() function will create an Observable that emits strings from
marble diagrams (even if the strings contain numbers).
So the type of x should be string, not number.1 parent 21fd0b4 commit 865d8d7
2 files changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
0 commit comments