-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (below))
I'm having trouble overriding Route type when initializing UniversalRouter:
interface MyRouteType {
customProperty: any;
}
const router = new UniversalRouter<MyContextType, MyRouteType>(routes, {
async resolveRoute(context, params) {
if (context.route.customProperty) {
console.log(context.route.customProperty);
}
},
});
My IDE is complaining that customProperty doesn't exist on context.route
I fixed it like this: http://www.mergely.com/oC2xyDZh/, but I'm still new to typescript and I'm not sure if my fix is any good.