diff --git a/types/options.d.ts b/types/options.d.ts index dcaf5f5a..6b5ebe41 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -80,7 +80,7 @@ export interface ComponentOptions< updated?(): void; activated?(): void; deactivated?(): void; - errorCaptured?(): boolean | void; + errorCaptured?(err: Error, vm: Vue, info: string): boolean | void; directives?: { [key: string]: DirectiveFunction | DirectiveOptions }; components?: { [key: string]: Component | AsyncComponent }; diff --git a/types/test/options-test.ts b/types/test/options-test.ts index df03ed78..6fc9e356 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -199,7 +199,10 @@ Vue.component('component', { updated() {}, activated() {}, deactivated() {}, - errorCaptured() { + errorCaptured(err, vm, info) { + err.message + vm.$emit('error') + info.toUpperCase() return true },