cyclejs-community / cyclic-router

Router Driver built for Cycle.js
MIT License
109 stars 25 forks source link

switchpath return type mismatch #192

Closed kylecordes closed 6 years ago

kylecordes commented 7 years ago

switchpath returns this:

export interface SwitchPathReturn {
    path: string | null;
    value: any | null;
}

while cyclic expects this:

export interface RouteMatcherReturn {
    path: string;
    value: any;
}

I'm not deep enough in to know whether this is just a matter of adjusting the type in cycle to keep up with switchpath, or if the possible null return requires more changes.

SteveALee commented 6 years ago

+1 as it would be good to lose this cast - given switch-path is default

jvanbruegge commented 6 years ago

Will fix that later, easy solution

jvanbruegge commented 6 years ago

Published in 5.1.1