-
Notifications
You must be signed in to change notification settings - Fork 3
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
Consider using config
for storing casbin configuration
#8
Comments
I didn't even know it existed! |
@simoneb Also I didn't find a way to extend types for RouteOptions so that it would be aware of the new config values, maybe you know how? |
If you mean extending a type described elsewhere, I'm not a ts guru but this is how I've done it in the past https://github.com/simoneb/axios-hooks/blob/master/test/axios.d.ts |
@simoneb Well, in
But
did not work for me, so I wonder if I do it wrong or extend the wrong type. |
From what I can see RouteOptions is exported from https://github.com/fastify/fastify/blob/master/fastify.d.ts#L143 and defined https://github.com/fastify/fastify/blob/b8122e24c3329c1a84f4fe0625743fe55286c11f/types/route.d.ts#L102. So I would think what you posted works, but maybe the generics are playing a part into why it is not working |
@simoneb Apparently needed to extend |
As per https://github.com/fastify/fastify/blob/master/docs/Routes.md#options:
The text was updated successfully, but these errors were encountered: