Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
},
"homepage": "https://github.com/cyclejs-community/cyclic-router#readme",
"dependencies": {
"@cycle/history": "^6.2.0",
"@cycle/history": "^6.3.0",
"@cycle/run": "^3.1.0",
"history": "^4.6.1"
"history": "^4.6.3"
},
"devDependencies": {
"@cycle/rxjs-run": "^7.0.0",
"@types/history": "^4.5.1",
"@types/history": "^4.6.0",
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.22",
"@types/node": "^8.0.19",
"assert": "^1.4.1",
"babel-preset-es2015": "^6.24.1",
"babel-register": "^6.24.1",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export {makeRouterDriver} from './makeRouterDriver';
export * from './makeRouterDriver';
export {RouterSource} from './RouterSource';
export * from './interfaces';
7 changes: 6 additions & 1 deletion src/makeRouterDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import {makeHistoryDriver} from '@cycle/history';
import {RouteMatcher} from './interfaces';
import {RouterSource} from './RouterSource';
import {History} from 'history';
import {HistoryInput, GenericInput} from '@cycle/history';
import {Stream} from 'xstream';

export declare type HistoryAction = HistoryInput | GenericInput | string;
export declare type RouterSink = Stream<HistoryAction>;

/**
* Instantiates an new router driver function using the same arguments required
Expand All @@ -25,7 +30,7 @@ function makeRouterDriver(history: History, routeMatcher: RouteMatcher) {
* history driver would expect.
* @return {routerAPI}
*/
return function routerDriver(sink$: any) {
return function routerDriver(sink$: RouterSink) {
const history$ = historyDriver(sink$).remember();
return new RouterSource(history$, [], history.createHref, routeMatcher);
};
Expand Down