Estou com este erro:

Type 'Resolver<{ type: { name?: string | undefined; id: string; }; reason_inviable_correction: string | undefined; }>' is not assignable to type 'Resolver<ITaskReviewInviableCorrectionData, any>'.
  Types of parameters 'values' and 'values' are incompatible.
    Type 'ITaskReviewInviableCorrectionData' is not assignable to type '{ type: { name?: string | undefined; id: string; }; reason_inviable_correction: string | undefined; }'.
      The types of 'type.id' are incompatible between these types.
        Type 'string | number | null' is not assignable to type 'string'.
          Type 'null' is not assignable to type 'string'.ts(2322)
(property) resolver?: Resolver<ITaskReviewInviableCorrectionData, any> | undefined

 no resolver do código abaixo:

import {
  forwardRef,
  ForwardRefRenderFunction,
  useCallback,
  useImperativeHandle,
  useRef,
  useState,
} from 'react';
import { SubmitHandler, useForm } from 'react-hook-form';


import {
  Flex,
  ModalBody,
  ModalFooter,
  Stack,
  StackDivider,
  Text,
} from '@chakra-ui/react';
import { yupResolver } from '@hookform/resolvers/yup';
import { useMutation } from '@tanstack/react-query';
import * as yup from 'yup';


import { taskInviableCorrectionDescriptions } from '~/assets/taskInviableCorrectionDescriptions';
import { OutlineRedButton } from '~/components/Buttons/Base/OutlineRedButton';
import { SolidOrangeButton } from '~/components/Buttons/Base/SolidOrangeButton';
import { Modal, ModalHandle } from '~/components/Form/Modal';
import { TextArea } from '~/components/Form/TextArea';
import { API_URL_TASKS } from '~/config/constants';
import { useFeedback } from '~/contexts/FeedbackContext';
import ISelectOption from '~/models/ISelectOption';
import ITaskReviewReproveModal from '~/models/Modal/Tasks/ITaskReviewReproveModal';
import { api } from '~/services/apiClient';
import { queryClient } from '~/services/queryClient';


interface ITaskReviewInviableCorrectionData {
  type: ISelectOption;
  reason_inviable_correction: string;
}


export type TaskReviewInviableCorrectionModalHandle = {
  onOpenModal: (recordModal: ITaskReviewReproveModal) => void;
};


const TaskReviewInviableCorrectionModalBase: ForwardRefRenderFunction<TaskReviewInviableCorrectionModalHandle> = (any, ref) => {
  const modalRef = useRef<ModalHandle>(null);
  const descriptionRef = useRef<HTMLTextAreaElement>(null);


  const { errorFeedbackToast } = useFeedback();


  const [recordModalProps, setRecordModalProps] = useState<ITaskReviewReproveModal | undefined>({} as ITaskReviewReproveModal);


  const taskReviewInviableCorrection = yup.object().shape({
    type: yup.object().shape({
      id: yup.string().required(),
      name: yup.string(),
    }).required(),
    reason_inviable_correction: yup.string()
      .when('type', ([type], schema) => ((type?.id === 'other')
        ? yup.string().min(20).required()
        : schema)),
  });


  const {
    register,
    handleSubmit,
    reset,
    watch,
    setValue,
    formState: { errors },
  } = useForm<ITaskReviewInviableCorrectionData>({
    resolver: yupResolver(taskReviewInviableCorrection),
  });


  const onOpenModal = useCallback((recordModal: ITaskReviewReproveModal) => {
    setRecordModalProps(recordModal);
    reset({});
    modalRef.current?.onOpenModal();
  // eslint-disable-next-line react-hooks/exhaustive-deps
  }, []);


  const { mutateAsync, isPending: isSubmitting } = useMutation({
    mutationFn: async ({ type, reason_inviable_correction }: ITaskReviewInviableCorrectionData) => {
      await api.patch(`${API_URL_TASKS}/${recordModalProps?.task_id}/audit`, {
        requires_correction: false,
        reason_inviable_correction: type?.id === 'other' ? reason_inviable_correction : type?.name,
      });
    },
    async onSuccess() {
      queryClient.invalidateQueries({ queryKey: ['tasks'] });
      if (recordModalProps?.onSubmit) {
        recordModalProps?.onSubmit();
      }
      modalRef.current?.onCloseModal();
    },
    onError(error: Error) {
      errorFeedbackToast('Tarefa Sem Correção', error);
    },
  });


  const handleOk: SubmitHandler<ITaskReviewInviableCorrectionData> = async (data) => {
    await mutateAsync(data);
  };


  useImperativeHandle(
    ref,
    () => ({
      onOpenModal,
    }),
    [onOpenModal],
  );


  const optionCard = (item?: ISelectOption) => {
    if (item) {
      return (
        <Flex
          key={item.id}
          gap="2"
          align="center"
          bg={item.id === watch('type')?.id ? 'orange.100' : 'transparent'}
          borderRadius={8}
          px="2"
          py="1"
          cursor="pointer"
          onClick={() => {
            setValue('type', item);
            if (item?.id === 'other') {
              setTimeout(() => {
                descriptionRef.current?.focus();
              }, 100);
            }
          }}
        >
          <Text>{item.name}</Text>
        </Flex>
      );
    }


    return <Text />;
  };


  return (
    <Modal
      ref={modalRef}
      title="Tarefa Sem Correção"
      size="full"
      isLoading={isSubmitting}
      onSubmit={handleSubmit(handleOk)}
    >
      <ModalBody>
        <Stack divider={<StackDivider borderColor="orange.500" w="100%" alignSelf="center" />}>
          {taskInviableCorrectionDescriptions.filter((type) => type.id !== 'other').map((item) => optionCard(item))}
          {optionCard(taskInviableCorrectionDescriptions.find((item) => item.id === 'other'))}
          {watch('type')?.id === 'other' && (
            <Flex mt="4">
              <TextArea
                inputRef={descriptionRef}
                label="Explique o Motivo"
                error={errors.reason_inviable_correction}
                {...register('reason_inviable_correction')}
                rows={5}
                placeholder="Mínimo de 20 caracteres"
                isDisabled={isSubmitting}
                isRequired
              />
            </Flex>
          )}
        </Stack>
      </ModalBody>
      <ModalFooter flexDirection="column" gap="4" w="100%">
        <SolidOrangeButton type="submit" isLoading={isSubmitting}>
          Confirmar
        </SolidOrangeButton>
        <OutlineRedButton onClick={() => modalRef.current?.onCloseModal()} isDisabled={isSubmitting}>
          Cancelar
        </OutlineRedButton>
      </ModalFooter>
    </Modal>
  );
};


export const TaskReviewInviableCorrectionModal = forwardRef(TaskReviewInviableCorrectionModalBase);