Skip to content

bun experimental decorators vue-property-decorator #31315

@ghost

Description

Environment

latest
bun

Reproduction

https://github.com/Maakdev/bug-2/blob/main/pages/index.vue

Describe the bug

With @options decorator from vue-class-component all is ok .

@emit decorator from vue-property-decorator all is bad.

Unable to resolve signature of property decorator when called as an expression.
  No overload matches this call.
    Overload 1 of 3, '(Ctor: VueConstructor<VueBase>): void', gave the following error.
      Argument of type 'undefined' is not assignable to parameter of type 'VueConstructor<VueBase>'.
    Overload 2 of 3, '(target: VueBase, key: string): void', gave the following error.
      Argument of type 'undefined' is not assignable to parameter of type 'VueBase'.
        Type 'undefined' is not assignable to type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>; ... 11 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (ar...'.ts-plugin(1240)

But with

// experimentalDecorators: true,
// emitDecoratorMetadata: true,

in 3-5 places of nuxt config (nuxt, nitro, ts, vite and other sections) all was normal.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions