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

VNodeDirective expression Typing #10871

Closed
WORMSS opened this issue Nov 28, 2019 · 1 comment · Fixed by #11189
Closed

VNodeDirective expression Typing #10871

WORMSS opened this issue Nov 28, 2019 · 1 comment · Fixed by #11189

Comments

@WORMSS
Copy link
Contributor

WORMSS commented Nov 28, 2019

What problem does this feature solve?

Currently the type for expression for VNodeDirective is optional any.

export interface VNodeDirective {
  name: string;
  value?: any;
  oldValue?: any;
  expression?: any;
  arg?: string;
  oldArg?: string;
  modifiers?: { [key: string]: boolean };
}

But if I am understanding expression usage correctly, this is the string representation of what is passed into the

<div v-my-directive="moose"></div>

So even though moose may be data or computer or something that returns 'not-moose' value, the expression itself is 'moose'.

So should this not be an optional string?

export interface VNodeDirective {
  name: string;
  value?: any;
  oldValue?: any;
  expression?: string;
  arg?: string;
  oldArg?: string;
  modifiers?: { [key: string]: boolean };
}
@Shubhamchinda
Copy link

Hey, I'd like to work on this!

kawokas added a commit to kawokas/vue that referenced this issue Mar 8, 2020
kawokas added a commit to kawokas/vue that referenced this issue Mar 8, 2020
kawokas added a commit to kawokas/vue that referenced this issue Mar 8, 2020
@posva posva added the has PR label Mar 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants