Skip to content

Commit

Permalink
test: cast string | number to string before concatenating
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
felixfbecker committed Aug 23, 2018
1 parent 2ecf10b commit 86e2707
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/operators/zipAll-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('zipAll operator', () => {
of('a', 'b', 'c'),
of(1, 2, 3)
)
.pipe(zipAll((a, b) => a + b))
.pipe(zipAll((a, b) => String(a) + String(b)))
.subscribe((x) => {
expect(x).to.equal(expected[i++]);
}, null, done);
Expand Down Expand Up @@ -378,7 +378,7 @@ describe('zipAll operator', () => {
of('a', 'b', 'c'),
of(1, 2)
)
.pipe(zipAll((a, b) => a + b))
.pipe(zipAll((a, b) => String(a) + String(b)))
.subscribe((x) => {
expect(x).to.equal(expected[i++]);
}, null, done);
Expand Down

0 comments on commit 86e2707

Please sign in to comment.