Browse Source

fix(types): fix wrong errorCaptured type (#7712)

dev
katashin 7 years ago
committed by Evan You
parent
commit
6b8516b2dd
  1. 2
      types/options.d.ts
  2. 5
      types/test/options-test.ts

2
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<any, any, any, any> | AsyncComponent<any, any, any, any> };

5
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
},

Loading…
Cancel
Save