-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
[5.0.0-beta.2] Migrating Hooks And Services Generated By Feathers CLI #2307
Comments
This should be fixed now in v5.0.0-pre.3 - |
@daffl If they are now exported as Additionally, what about the errors thrown when using hooks from Calling
Calling
Calling
I'm assuming this is because the |
Correct. Probably similar issues for the database adapters. You could open an issue in the related repo but a pull request would be even more welcome. |
If the definitions are for Dove, I'm assuming any pull requests should have a new branch with the changes applied there? |
@daffl I've created pull requests for both |
Awesome, thank you for doing that! I'll have a look at how to roll those out (probably as a pre-release for now, too) - looking at some small database adapter API improvements (mostly #2103) for v5 after that as well. |
I'm attempting to migrate from v4.5.9 to v5.0.0-pre.2, and have run into some complaints from the Typescript compiler. I've read through the migration guide, as well as all the Dove version of the documentation, but I'm having some difficulty resolving the issues.
Hooks
Currently, a hook generated by the CLI looks like this:
Importing
Hook
throws the following:Module '"@feathersjs/feathers"' has no exported member 'Hook'.
What changes need to be made here? Is this simply a definitions issue, or should the hook be created a different way?Additionally, several hooks throw the following when used inside an
iif
hook fromfeathers-hooks-common
:Services
Services generated by the CLI create three files:
*.class.ts
,*.hooks.ts
, and*.service.ts
. With a fresh service from the CLI, two errors are thrown.Here we get the error
Generic type 'ServiceAddons<A, S>' requires 2 type argument(s).
From reading through some of the issues, it looks like this can be changed to the following without issues. Is this correct?
The second issue appears on this line:
app.use('/test', new Test(options, app));
Here the error reads
I noticed that changing this line to
app.use('test', new Test(options, app));
clears the error, but I have no idea if this is the correct fix.I know this is all still beta, but I wanted to jump in early as the update to Grant 5 will allow me to do some things that I haven't been able to. I appreciate any insight as to how and what to change to clear the errors and allow the project to compile successfully.
The text was updated successfully, but these errors were encountered: