-
Notifications
You must be signed in to change notification settings - Fork 0
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
Middleware doesn't work with createFarceRouter #153
Comments
Do you have more details on how you're using this? |
@taion same as in this sample https://github.com/relay-tools/found-relay#router-configuration |
What are you passing in for the route config to |
I missed the fact, that |
don't worry about it! i'm clarifying things in the README a bit in #154 |
Adding types would also be a big help for all typescript users, then errors like this couldn't happen. For this package I wrote the type def myself, and it looks like this: declare module 'found-named-routes' {
import Middleware from 'farce';
import RouteConfig from 'found';
const createNamedRoutesMiddleware = (routeConfig: RouteConfig) => Middleware;
} Only problem is, that it depends on farce in this case. |
You're right. I need to find time to get 4Catalyzer/farce#175 merged, too. |
Seems this doesn't work with
createFarceRouter
. I get the following error:TypeError: matcher.routeConfig.forEach is not a function
increateMatcherNamedRoutesMiddleware.js:59
The text was updated successfully, but these errors were encountered: