My code is as beloew
interface CurriculumDetailsApi { curriculum_id: number; curriculum_name: string; description: string; percentage_of_completion: number; post_id: string; post_type: string; topics: Topics[];}const apiWithTaggedEndpoints = apiWithTag.injectEndpoints({ endpoints: builder => ({ curriculumDetails: builder.query<CurriculumDetailsApi, input>({ query: payload => ({ url: `/${payload.postId}/${payload.employeeId}`, method: 'GET', headers: {'Content-Type': 'application/json', }, }), }), }), overrideExisting: true,> });
I get an error like this
Type '(payload: Args) => { url: string; method: string; headers: { 'Content-Type': string; }; }' is not assignable to type '(arg: Args) => string'.Type '{ url: string; method: string; headers: { 'Content-Type': string; }; }' is not assignable to type 'string'.ts(2322)endpointDefinitions.d.ts(36, 5): The expected type comes from property 'query' which is declared here on type 'Omit<EndpointDefinitionWithQuery<Args, BaseQueryFn<string, unknown, { reason: string; }, { shout?: boolean | undefined; }, { timestamp: number; }>, CurriculumDetailsApi> & { ...; } & { ...; } & QueryExtraOptions<...>, "type"> | Omit<...>'
How can i assign type to the data from the API call