Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Compatibility with vue-class-component v8 #449

@ghost

Description

It seems like vue-property-decorator (9.1.2) is not compatible with the upcoming vue-class-component@8.0.0-0.

At the moment I am getting the following errors when declaring Components

TS1238: Unable to resolve signature of class decorator when called as an expression.
  This expression is not callable.
    Type 'typeof import("C:/[redacted]/vue-ui/node_modules/vue-class-component/dist/vue-class-component")' has no call signatures.
    33 | import { Vue, Component, Prop } from "vue-property-decorator";
    34 |
  > 35 | @Component`
       |  ^^^^^^^^^
    36 | export default class SearchField extends Vue {

It seems to be working with the following syntax

import { Options, Vue } from "vue-class-component";
import { Prop } from "vue-property-decorator";
import Breadcrumb, { BreadcrumbItem } from "@/components/portal/breadcrumb.vue";
import PageTitle from "@/components/portal/page-title.vue";

@Options({
  components: {
    Breadcrumb,
    PageTitle,
  },
})
export default class PageFrame extends Vue {
  @Prop() pageTitle!: string
  @Prop() breadcrumbItems!: BreadcrumbItem[]
}

How it looked like originally

import { Vue, Component, Prop } from "vue-property-decorator";
import Breadcrumb, { BreadcrumbItem } from "@/components/portal/breadcrumb.vue";
import PageTitle from "@/components/portal/page-title.vue";

@Component({
  components: {
    Breadcrumb,
    PageTitle,
  },
})
export default class PageFrame extends Vue {
  @Prop() pageTitle!: string
  @Prop() breadcrumbItems!: BreadcrumbItem[]
}

Further reading:

vuejs/vue-class-component#406

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions