Skip to content

Commit

Permalink
fix(types): fix wrong errorCaptured type (#7712)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktsn authored and yyx990803 committed Mar 8, 2018
1 parent 2b0fc38 commit 6b8516b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> };
Expand Down
5 changes: 4 additions & 1 deletion types/test/options-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ Vue.component('component', {
updated() {},
activated() {},
deactivated() {},
errorCaptured() {
errorCaptured(err, vm, info) {
err.message
vm.$emit('error')
info.toUpperCase()
return true
},

Expand Down

0 comments on commit 6b8516b

Please sign in to comment.