Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Type 'unknown' is not assignable to type '(prevState: ImagingRequestError | undefined) => ImagingRequestError | undefined'. #2771

Open
Lemmynjash opened this issue Oct 4, 2021 · 0 comments

Comments

@Lemmynjash
Copy link

I am getting the following error when executing npm start

Failed to compile.

VisualStudioCodeProjects/hospitalrun-frontend/src/imagings/requests/NewImagingRequest.tsx
TypeScript error in VisualStudioCodeProjects/hospitalrun-frontend/src/imagings/requests/NewImagingRequest.tsx(115,16):
Argument of type 'unknown' is not assignable to parameter of type 'SetStateAction<ImagingRequestError | undefined>'.
  Type 'unknown' is not assignable to type '(prevState: ImagingRequestError | undefined) => ImagingRequestError | undefined'.  TS2345

    113 |       history.push(`/imaging`)
    114 |     } catch (e) {
  > 115 |       setError(e)
        |                ^
    116 |     }
    117 |   }

Kindly Assist

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant