diff --git a/types/options.d.ts b/types/options.d.ts index 9fcdaca624f..93eebecc0e0 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -180,7 +180,7 @@ export interface ComponentOptions< propsData?: object computed?: Accessors methods?: Methods - watch?: Record | WatchHandler> + watch?: Record | WatchHandler | Array | WatchHandler>> setup?: ( this: void, diff --git a/types/test/options-test.ts b/types/test/options-test.ts index 49deeb9ef44..8b724083709 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -172,7 +172,14 @@ Vue.component('component', { d: { handler: 'someMethod', immediate: true - } + }, + e: [ + 'handle1', + function handle2 (val, oldVal) {}, + { + handler: function handle3 (val, oldVal) {}, + } + ], }, el: '#app', template: '
{{ message }}
',