@@ -41,14 +41,17 @@ type JsonObject = { [Key in string]?: JsonValue };
41
41
42
42
type Slot = string | string [ ] ;
43
43
44
- export interface MountOptions < HooksConfig extends JsonObject , Props extends JsonObject > {
44
+ export interface MountOptions <
45
+ HooksConfig extends JsonObject ,
46
+ Props extends Record < string , unknown >
47
+ > {
45
48
props ?: Props ;
46
49
slots ?: Record < string , Slot > & { default ?: Slot } ;
47
50
on ?: Record < string , Function > ;
48
51
hooksConfig ?: HooksConfig ;
49
52
}
50
53
51
- interface MountResult < Props extends JsonObject > extends Locator {
54
+ interface MountResult < Props extends Record < string , unknown > > extends Locator {
52
55
unmount ( ) : Promise < void > ;
53
56
update ( options : Omit < MountOptions < never , Props > , 'hooksConfig' > ) : Promise < void > ;
54
57
}
@@ -62,9 +65,12 @@ export interface ComponentFixtures {
62
65
mount ( component : JSX . Element ) : Promise < MountResultJsx > ;
63
66
mount < HooksConfig extends JsonObject > (
64
67
component : any ,
65
- options ?: MountOptions < HooksConfig , JsonObject >
66
- ) : Promise < MountResult < JsonObject > > ;
67
- mount < HooksConfig extends JsonObject , Props extends JsonObject = JsonObject > (
68
+ options ?: MountOptions < HooksConfig , Record < string , unknown > >
69
+ ) : Promise < MountResult < Record < string , unknown > > > ;
70
+ mount <
71
+ HooksConfig extends JsonObject ,
72
+ Props extends Record < string , unknown > = Record < string , unknown >
73
+ > (
68
74
component : any ,
69
75
options : MountOptions < HooksConfig , never > & { props : Props }
70
76
) : Promise < MountResult < Props > > ;
0 commit comments