Steps to reproduce
feathers-permissions currently uses Feathers 4.5.15. This library is not compatible with the latest Feathers v5 hook types. Specifically, the return type of checkPermissions (Hook) is not compatible with the new HookFunction type - Argument of type 'Hook' is not assignable to parameter of type 'HookFunction<A, S>.
The common solution seems to be to cast the checkPermissions hook to any (or some other matching type), which isn't ideal.
Expected behavior
Using the checkPermissions hook with Feathers v5 does not produce a type error.
Actual behavior
Type error when using checkPermissions hook with Feathers v5.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
- "@feathersjs/feathers": "^5.0.24"
- "feathers-permissions": "^2.1.4"
NodeJS version:
v20.3.0
Operating System:
14.3.1 (23D60)
Browser Version:
Chrome Version 123.0.6312.59
Steps to reproduce
feathers-permissionscurrently uses Feathers 4.5.15. This library is not compatible with the latest Feathers v5 hook types. Specifically, the return type ofcheckPermissions(Hook) is not compatible with the newHookFunctiontype -Argument of type 'Hook' is not assignable to parameter of type 'HookFunction<A, S>.The common solution seems to be to cast the
checkPermissionshook toany(or some other matching type), which isn't ideal.Expected behavior
Using the
checkPermissionshook with Feathers v5 does not produce a type error.Actual behavior
Type error when using
checkPermissionshook with Feathers v5.System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
NodeJS version:
v20.3.0
Operating System:
14.3.1 (23D60)
Browser Version:
Chrome Version 123.0.6312.59