Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): fix wrong errorCaptured type #7712

Merged
merged 2 commits into from Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/options.d.ts
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
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