Skip to content

Strange errors in vue-class-component v8 #457

@Mikilll94

Description

@Mikilll94

I have a class component like this:

import Person from '@/models/Person';
import { PropType } from 'vue';
import { emits, mixins, Options, props } from 'vue-class-component';

const Props = props({
  person: {
    type: Object as PropType<Person>,
    required: true
  }
})

const Emits = emits({
  input: (value) => typeof value === 'number'
})

@Options
export default class HelloWorld extends mixins(Props, Emits) {
  private myData = this.person;

  mounted() {
    this.$emit('input', 2);
  }
}

And I receive the following errors:

Screenshot 2020-09-20 at 12 33 07

Here is the repro project which you can run and check this error:
class-component-test.zip

I am using:

  • vue 3.0.0
  • vue-class-component 8.0.0-beta.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy