Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

513
Views
Property '...' does not exist on type 'Api<BaseQueryFn<string | FetchArgs, unknown, FetchBaseQueryError, {}, FetchBaseQueryMeta> redux-tookit
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"
import { JobForm, Job } from "../types/JobsTypes"

export const createJobApis = createApi({
    reducerPath: "createJobApi",
    baseQuery: fetchBaseQuery({
        baseUrl: "http://localhost:8000/api/v1/jobs",
        prepareHeaders: (headers) => {
            headers.set("Content-Type", "application/json")
            headers.set("accept", "application/json")
            return headers
        },
    }),
    endpoints: (build) => ({
        getAll: build.query<Job, void>({ query: () => "/" }),
        created: build.mutation({
            query: (body: JobForm) => ({
                url: "/",
                method: "post",
                body,
            }),
        }),
    }),
})

export const { useCreatedMutation, useGetAllQuery } = createJobApis
console.log(useCreatedMutation)

Typescript says property does not exist on both the useCreatedMutation and useGetAllQuery on hover and has a type of any, but the console log returns a function and I tried it and it works and I get no error in the console, just no type support and a red underline on both exports

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!