Skip to content

Commit

Permalink
fix(types): changed expression type to optional string (#11189)
Browse files Browse the repository at this point in the history
fix #10871
  • Loading branch information
kawokas committed Mar 30, 2021
1 parent 2488a6a commit 7c75462
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions types/test/options-test.ts
Expand Up @@ -482,3 +482,20 @@ Vue.component('functional-component-v-model', {


Vue.component('async-es-module-component', () => import('./es-module'))

Vue.component('directive-expression-optional-string', {
render(createElement) {
return createElement("div", {
directives: [
{
name: 'has-expression',
value: 2,
expression: '1 + 1',
}, {
name: 'no-expression',
value: 'foo',
},
],
})
}
});
2 changes: 1 addition & 1 deletion types/vnode.d.ts
Expand Up @@ -69,7 +69,7 @@ export interface VNodeDirective {
name: string;
value?: any;
oldValue?: any;
expression?: any;
expression?: string;
arg?: string;
oldArg?: string;
modifiers?: { [key: string]: boolean };
Expand Down

0 comments on commit 7c75462

Please sign in to comment.