-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
Steps to reproduce
const restClient = rest("http://localhost:3030").fetch(
window.fetch.bind(window)
);
const client = createClient(restClient);
client.use("user", restClient.service("user"), {
methods: ["get", "create", "patch", "aCustomMethod"],
});
Actual behavior
TS2345: Argument of type 'Partial<ServiceMethods<any, Partial<any>, Params<Query>>>' is not assignable to parameter of type 'ClientService<{ first_name?: string | undefined; last_name?: string | undefined; role?: string | undefined; email?: string | undefined; password?: string | undefined; id: string; }, { id?: string | undefined; ... 4 more ...; password: string; }, { ...; }, Paginated<...>, Params<...>> & { ...; }'. Type 'Partial<ServiceMethods<any, Partial<any>, Params<Query>>>' is not assignable to type 'ClientService<{ first_name?: string | undefined; last_name?: string | undefined; role?: string | undefined; email?: string | undefined; password?: string | undefined; id: string; }, { id?: string | undefined; ... 4 more ...; password: string; }, { ...; }, Paginated<...>, Params<...>>'. Types of property 'find' are incompatible. Type '((params?: Params<Query> | undefined) => Promise<any>) | undefined' is not assignable to type '(params?: Params<{ id?: string | { $gt?: string | undefined; $gte?: string | undefined; $lt?: string | undefined; $lte?: string | undefined; $ne?: string | undefined; $in?: string[] | undefined; $nin?: string[] | undefined; } | undefined; ... 7 more ...; $select?: DeepWritable<...>[] | undefined; }> | undefined) => ...'. Type 'undefined' is not assignable to type '(params?: Params<{ id?: string | { $gt?: string | undefined; $gte?: string | undefined; $lt?: string | undefined; $lte?: string | undefined; $ne?: string | undefined; $in?: string[] | undefined; $nin?: string[] | undefined; } | undefined; ... 7 more ...; $select?: DeepWritable<...>[] | undefined; }> | undefined) => ...'.
System configuration
Tell us about the applicable parts of your setup.
Module versions :
"@feathersjs/authentication-client": "^5.0.0-pre.29",
"@feathersjs/feathers": "^5.0.0-pre.29",
"@feathersjs/rest-client": "^5.0.0-pre.29",
"typescript": "^4.8.4"
Everything else works, besides the Typescript error
