cyclejs-community / cyclic-router

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

export RouteMatcherReturn interface #193

Closed kylecordes closed 7 years ago

kylecordes commented 7 years ago

To fully type an application using cyclic-router, I need to refer to the RouteMatcherReturn interface.

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

This currently requires ugly imports:

import { RouteMatcherReturn } from 'cyclic-router/lib/interfaces';

I think this interface should be re-export this from the facade, for simpler use from application code.

(Related: RouterSource.define currently returns type any - it's really a Stream<RouteMatcherReturn>, right?)

ntilwalli commented 7 years ago

Can you submit a PR?

kylecordes commented 7 years ago

Yes... But I feel like I should use this router a bit more, to have confidence my changes are good. Will do.

kylecordes commented 7 years ago

@ntilwalli #194