Skip to content

support computed as arrow function in typescript #10878

Open
@whbjzzwjxq

Description

@whbjzzwjxq

What problem does this feature solve?

transform a project which has used lots of ' xxx: vm => vm.prop ' as computed options to typescript easier

What does the proposed API look like?

change vue/types/options.d.ts type Accessors to

export type Accessors<T> = {
  [K in keyof T]: (() => T[K]) | ComputedOptions<T[K]> | ((vm: any) => T[K])
}

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