Closed
Description
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 };
}