Skip to content

Commit

Permalink
[added] upstream to _reactiveNextOperator's combineLatest generic
Browse files Browse the repository at this point in the history
Summary: This is a quick fix that should be thought through more thoroughly in #246.

Reviewers: O2 Material Motion, O3 Material JavaScript platform reviewers, #material_motion

Tags: #material_motion

Differential Revision: http://codereview.cc/D3451
  • Loading branch information
appsforartists committed Jul 20, 2018
1 parent c51b4e5 commit 61ad597
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ export function withReactiveNextOperator<T, S extends Constructor<Observable<T>>
emit: observer.next.bind(observer),
});

return combineLatest<D, MaybeReactive<D>>(
// TODO: verify this is the correct type.
//
// I added `{upstream: Observable<T>}` because otherwise `inputs` was
// getting inferred to require an `upstream` at a callsite. This
// appears to fix it, but I haven't taken the time to reason if it's
// correct.
return combineLatest<D, MaybeReactive<D> & {upstream: Observable<T>}>(
// TypeScript doesn't like ...inputs, so we use the longhand version
Object.assign(
{ upstream: this },
Expand Down

0 comments on commit 61ad597

Please sign in to comment.