-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
I'm sorry if I make too many issues on all the V4 stuff, but i stumble upon many things I think other users might also stumble upon.
The problem
So I want my hooks to be typed. But I do not know how.
First thing I do is ask:
How does the documentation or examples do it?
I looked into:
- the docs example: https://docs.feathersjs.com/guides/basics/hooks.html#quick-example
- Feathersjs v4 chat example: https://github.com/feathersjs/feathers-chat-ts
Both of them don't have.
So I digged deeper and I looked into the source code, finding an example. But unfortunately it was using any so I could not really find a good example on what these things should be.

Possible solution
One thing I could do is creating an interface in the models/serviceName.model.ts file in the models folder. Like the screenshot below

And use it like this

Request
But I do not know what the best practice is for this. I like feathers to provide me with an example and best practices so we all have a standard to follow.