React Props Typescript Error: Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions

Viewed 22

I am getting this error from typescript and not seeing the correct syntax to pass props into this function.

Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions

type SigningProps = {
  appendSignature: (data: any, control: any) => void;
  signatureType: string;
};

  function handleSave(props) {
    
    props.appendSignature(
      sigPad.current.getTrimmedCanvas().toDataURL('image/png')),
      props.signatureType
     }
0 Answers
Related