title: Custom prop type Vue.js
body: <p>Is there a way to create custom prop types (and extend it with validation) for Vue.js props?</p>
  
  <p>In the below example you'll find the Object prop <code>background</code>. Instead of an Object, I would like to have a custom prop type Image.
  Image would check if <code>src</code> and <code>alt</code> are filled, rest would be optional.</p>
  
  <p>What we have now:</p>
  
  <pre><code>export default {
    props: {
      background: {
        type: Object,
        src: String,
        srcset: String,
        alt: String,
        title: String,
      },
    },
  };
  </code></pre>
  
  <p>What I'd like to have:</p>
  
  <pre><code>class customPropImage {
    // magic ...
  }
  
  export default {
    props: {
      background: Image,
    },
  };
  </code></pre>