score:0

i think there are 2 ways to fix this,

  1. don't destructure the function's parameters and refer to errors interface

    function validationerrors(errors: errors) {
    
    }
    
  2. provide information about each value that you will get on destructuring parameters.

    function validationerrors({ message, errors }: { message: string | null, 
    errors: { [key: string]: string[] } }) {
    
    }
    

Related Query

More Query from same tag