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

Fix implicit any type for Scheduler.next()/remove() #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix implicit any type for Scheduler.next()/remove() #145

wants to merge 1 commit into from

Commits on Nov 29, 2018

  1. Fix implicit any type for Scheduler.next()/remove()

    Scheduler<T> takes a type, but its internal representation of the object
    tracker was set to `any` instead of `T`. This resulted in `next()`
    returning `any`, which lost typing and required unnecessary casting when
    it is called..
    
    This also creates an error, as `next()` can also return null, which is not enforced by the type checker.
    
    Lastly, `remove()` item was `any`, rather than `T`, so you lost the
    type checking for calling it.
    
    This fixes `next()` and `remove()` to use the expected `T` so that the
    type checker catches all of these issues with all of the schedulers.
    bbugh committed Nov 29, 2018
    Configuration menu
    Copy the full SHA
    791d105 View commit details
    Browse the repository at this point in the history