Skip to content

Commit

Permalink
types(v-node-directive): changed expression type of VNodeDerective to…
Browse files Browse the repository at this point in the history
… optional string

fix vuejs#10871
  • Loading branch information
kawokas committed Mar 8, 2020
1 parent bce5b98 commit 730f0d1
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 @@ -478,3 +478,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 730f0d1

Please sign in to comment.