Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operator/publishReplay.ts:give type arguments to higherOrder call #2992

Merged
merged 3 commits into from
Oct 25, 2017

Commits on Oct 24, 2017

  1. operator/publishReplay.ts:give type args to higherOrder call

    operator/publishReplay delegates to operators/publishReplay. The call is
    correct — *one* of the three overloads will be called, and it
    doesn't matter which — but
    the compiler has to choose one overload. This change provides the type
    arguments explicitly so that the most general overload gets called. This
    results in the the correct return type, `OperatorFunction<T, R>`.
    sandersn committed Oct 24, 2017
    Configuration menu
    Copy the full SHA
    ab8fecb View commit details
    Browse the repository at this point in the history
  2. fix: give type args to higherOrder call in src/operator/publishReplay.ts

    operator/publishReplay delegates to operators/publishReplay. The call is
    correct &mdash; *one* of the three overloads will be called, and it
    doesn't matter which &mdash; but
    the compiler has to choose one overload. Previously, the call didn't
    include type arguments, and the type of the one argument that would be
    used for inference, selectorOrScheduler, was of type `any`. So the
    compiler chose the first overload with four parameters. However, the
    return type of this overload is incorrect, whereas the return type of the
    third overload is correct. Provide the type
    arguments explicitly so that the last, most general overload gets called. This
    results in the the correct return type, `OperatorFunction<T, R>`.
    
    Closes ReactiveX#2991
    sandersn committed Oct 24, 2017
    Configuration menu
    Copy the full SHA
    9f651b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e831ca View commit details
    Browse the repository at this point in the history