-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix: isProvider returns a boolean #444
Conversation
types/index.d.ts
Outdated
@@ -210,7 +210,7 @@ export function getItems(context: HookContext): any; // any[] | any | undefined; | |||
* Check which transport provided the service call. | |||
* {@link https://feathers-plus.github.io/v1/feathers-hooks-common/index.html#IsProvider} | |||
*/ | |||
export function isProvider(...transports: TransportName[]): PredicateFn; | |||
export function isProvider(...transports: TransportName[]): boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not correct, it should return "SyncPredicateFn", would you also please fix the test?
test still needs fixing, change the expected type to |
I'm such a noob, sorry for steeling your time... |
Now I think I understand what you mean with "fix the tests" |
don't worry. I was referring to |
Fixed tests.ts. Travis looks good? |
Great, thanks :) |
Published as v4.17.6 |
Hi Eddy,
as discussed on Slack, I think the
isProvider
method is returning aboolean
.The usage of it should therefore be changed in the docs as well I guess to something like: