Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was 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

@Lemmynjash

Description

@Lemmynjash

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions