interface IErrorObject {
  readonly type: 'error',
  props: {
    message: string
  }
}

interface IInputErrorData {
  type: string,
  message: string
}

export const getErrorObject = ({ type, message }: IInputErrorData) => {
  return function () {
    return {
      type: 'error',
      props: {
        message: `${message}: No method found for type: ${type}`
      }
    }
  }
}

export {
  IErrorObject
}