Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support computed as arrow function in typescript #10878

Open
whbjzzwjxq opened this issue Nov 30, 2019 · 0 comments
Open

support computed as arrow function in typescript #10878

whbjzzwjxq opened this issue Nov 30, 2019 · 0 comments
Labels

Comments

@whbjzzwjxq
Copy link

@whbjzzwjxq whbjzzwjxq commented Nov 30, 2019

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])
}
@whbjzzwjxq whbjzzwjxq changed the title support computed as arrow function in typescript support computed as arrow function in typescript :typescript Nov 30, 2019
@whbjzzwjxq whbjzzwjxq changed the title support computed as arrow function in typescript :typescript support computed as arrow function in typescript Nov 30, 2019
@posva posva added the typescript label Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.