forked from kadirahq/flow-router
-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
Description
I'm having an issue:
According to docs here, the prefix
option is optional for Router.group
but required in the type definition
ostrio:flow-router-extra@3.9.0
METEOR@2.12
FlowRouter.group({
name: 'fooGroup',
triggersEnter: [],
});
error:
Parameter 'context' implicitly has an 'any' type, but a better type may be inferred from usage.ts(7044)
Argument of type '{ name: string; triggersEnter: ((context: any, redirect: any) => void)[]; }' is not assignable to parameter of type '{ [key: string]: any; name: string; prefix: string; }'.
Property 'prefix' is missing in type '{ name: string; triggersEnter: ((context: any, redirect: any) => void)[]; }' but required in type '{ [key: string]: any; name: string; prefix: string; }'.ts(2345)
types.d.ts(59, 38): 'prefix' is declared here.
I have a suggestion:
make a change here
group: (options: { name: string; prefix?: string; [key: string]: any }) => any;
generalleger and dr-dimitru