File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ import { stubComponents } from './stubs'
34
34
35
35
type Slot = VNode | string | { render : Function }
36
36
37
- interface MountingOptions < Props , Data = { } > {
38
- data ?: ( ) => Data
37
+ interface MountingOptions < Props , Data extends object = { } > {
38
+ data ?: ( ) => Data extends unknown ? never : Data
39
39
props ?: Props
40
40
attrs ?: Record < string , unknown >
41
41
slots ?: {
Original file line number Diff line number Diff line change @@ -20,6 +20,17 @@ expectType<string>(
20
20
} ) . vm . a
21
21
)
22
22
23
+ // no data provided
24
+ expectError (
25
+ mount ( AppWithDefine , {
26
+ data ( ) {
27
+ return {
28
+ myVal : 1
29
+ }
30
+ }
31
+ } )
32
+ )
33
+
23
34
// can receive extra props
24
35
// ideally, it should not
25
36
// but the props have type { a: string } & VNodeProps
You can’t perform that action at this time.
0 commit comments