File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export class VueWrapper<
172
172
}
173
173
174
174
emitted < T = unknown > ( ) : Record < string , T [ ] >
175
- emitted < T = unknown > ( eventName : string ) : undefined | T [ ]
175
+ emitted < T = unknown [ ] > ( eventName : string ) : undefined | T [ ]
176
176
emitted < T = unknown > (
177
177
eventName ?: string
178
178
) : undefined | T [ ] | Record < string , T [ ] > {
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ byClassArray = domWrapper.findAll('.todo')
62
62
expectType < Element | undefined > ( byClassArray [ 0 ] . element )
63
63
64
64
// emitted
65
+
66
+ // event name without specific type
67
+ let incrementEventWithoutType = wrapper . emitted ( 'increment' )
68
+ expectType < unknown [ ] [ ] | undefined > ( incrementEventWithoutType )
69
+
65
70
// event name
66
71
let incrementEvent = wrapper . emitted < { count : number } > ( 'increment' )
67
72
expectType < { count : number } [ ] | undefined > ( incrementEvent )
You can’t perform that action at this time.
0 commit comments