Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromvuejs/vue

Commit6b8516b

Browse files
ktsnyyx990803
authored andcommitted
fix(types): fix wrong errorCaptured type (vuejs#7712)
1 parent2b0fc38 commit6b8516b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎types/options.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface ComponentOptions<
8080
updated?():void;
8181
activated?():void;
8282
deactivated?():void;
83-
errorCaptured?():boolean|void;
83+
errorCaptured?(err:Error,vm:Vue,info:string):boolean|void;
8484

8585
directives?:{[key:string]:DirectiveFunction|DirectiveOptions};
8686
components?:{[key:string]:Component<any,any,any,any>|AsyncComponent<any,any,any,any>};

‎types/test/options-test.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ Vue.component('component', {
199199
updated(){},
200200
activated(){},
201201
deactivated(){},
202-
errorCaptured(){
202+
errorCaptured(err,vm,info){
203+
err.message
204+
vm.$emit('error')
205+
info.toUpperCase()
203206
returntrue
204207
},
205208

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp