title: Expected T, got Object in Vue-Prop of custom Object-Type
body: <h3>Description</h3>
  <p>Hello there,</p>
  <p>I would like to share my Vue-components using bit.dev.</p>
  <p>I got a Vue-component like this:</p>
  <pre><code>&lt;template&gt;
      ...
  &lt;/template&gt;
  
  &lt;script&gt;
  
  import CustomItem from &quot;../../../../objects/CustomItem&quot;;
  
  export default {
      name: &quot;Test&quot;,
      props: {
          item: {
              type: CustomItem,
          },
      },
  };
  &lt;/script&gt;
  </code></pre>
  <p>As you can see, this component requires the prop to be a specific object.</p>
  <p>This is the <code>CustomObject</code></p>
  <pre><code>export default class CustomItem {
      constructor ({id, name}) {
          this.id = id;
          this.name = name;
      }
  
     // provide cool functions here
  }
  </code></pre>
  <p>This works fine in my project, but not if I include this this way:</p>
  <pre><code>&lt;template&gt;
      &lt;div v-if=&quot;!$wait.is('item.loading')&quot;&gt;
          &lt;MyComponent :item=&quot;item&quot;/&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import MyComponent from '@bit/myproject.my-component'
  import CustomItem from '@bit/myproject.custom-item';
  
  export default {
      name: 'Home',
      components: {MyComponent},
      data () {
          return {
              item: {}
          };
      },
      beforeRouteEnter (to, _from, next) {
          const promises = [
              axios.get (`/api/item/1`)
          ];
  
          next (vm =&gt; {
              vm.$wait.start ('item.loading');
              axios.all (promises)
              .then (([itemRes]) =&gt; {
                  vm.item = new CustomItem(itemRes.data.data);
              }).finally(()=&gt;{
                  vm.$wait.end ('item.loading');
              });
          });
      },
  };
  &lt;/script&gt;
  </code></pre>
  <p>In this case I get this error:</p>
  <pre><code>[Vue warn]: Invalid prop: type check failed for prop &quot;item&quot;. Expected T, got Object 
  
  found in
  
  ---&gt; &lt;MyComponent&gt; at resources/js/components/Items/MyComponent.vue
  </code></pre>
  <p>What did I miss here?</p>
  <h2>Edit</h2>
  <p>As I can see, the component <code>@bit/myproject.my-component</code> which has been provided by bit.dev, provides a packed and minified version of my component. In there, the prop looks like this:</p>
  <pre><code>props:{item:{type:function t(e){var n=e.id,r=e.name})...
  </code></pre>
  <p>So I guess this is why this happens.</p>