Closed AshotN closed 1 year ago
The typing of feathers method params is not in the hands of the library.
You can adjust the typing of params in the declarations.ts
file of your project. As example, the generator also adds the user object to the params interface.
// Add the user as an optional property to all params
declare module '@feathersjs/feathers' {
interface Params {
user?: UsersResult;
params?: Record<string, string>;
}
}
data
is alsoundefined
if it matters
data
should be only defined if provided to the REST call when using a method that supports data (POST, PUT, PATCH). For a GET call it should always be undefined.
Thanks for the help!
Describe the bug The typing for the custom method doesn't expose
params
which contains theid
in the path.To Reproduce
Expected behavior The typing should contain
params
as an exposed property, or provide another means to retrieve the ID.System configuration
Additional context
data
is alsoundefined
if it matters