Browse Source

fix(types): changed expression type to optional string (#11189)

fix #10871
dev
Kawokas 4 years ago
committed by GitHub
parent
commit
7c75462354
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      types/test/options-test.ts
  2. 2
      types/vnode.d.ts

17
types/test/options-test.ts

@ -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
types/vnode.d.ts

@ -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 };

Loading…
Cancel
Save