type ErrorHandler = (error: IError) => void // type for only one function
// or
interface IErrorHandler {
ErrorHander: (error: IError) => void
}
// IError Interface if interest
interface IError {
error: string;
status: number;
message: string;
}