@@ -39,6 +39,7 @@ describe('object props', () => {
39
39
ggg : 'foo' | 'bar'
40
40
ffff : ( a : number , b : string ) => { a : boolean }
41
41
validated ?: string
42
+ object ?: object
42
43
}
43
44
44
45
describe ( 'defineComponent' , ( ) => {
@@ -106,7 +107,8 @@ describe('object props', () => {
106
107
type : String ,
107
108
// validator requires explicit annotation
108
109
validator : ( val : unknown ) => val !== ''
109
- }
110
+ } ,
111
+ object : Object as PropType < object >
110
112
} ,
111
113
setup ( props ) {
112
114
return {
@@ -140,6 +142,7 @@ describe('object props', () => {
140
142
expectType < ExpectedProps [ 'ggg' ] > ( props . ggg )
141
143
expectType < ExpectedProps [ 'ffff' ] > ( props . ffff )
142
144
expectType < ExpectedProps [ 'validated' ] > ( props . validated )
145
+ expectType < ExpectedProps [ 'object' ] > ( props . object )
143
146
144
147
// raw bindings
145
148
expectType < Number > ( rawBindings . setupA )
@@ -263,7 +266,8 @@ describe('object props', () => {
263
266
type : String ,
264
267
// validator requires explicit annotation
265
268
validator : ( val : unknown ) => val !== ''
266
- }
269
+ } ,
270
+ object : Object as PropType < object >
267
271
} ,
268
272
269
273
setup ( ) {
@@ -293,6 +297,7 @@ describe('object props', () => {
293
297
expectType < ExpectedProps [ 'ggg' ] > ( props . ggg )
294
298
// expectType<ExpectedProps['ffff']>(props.ffff) // todo fix
295
299
expectType < ExpectedProps [ 'validated' ] > ( props . validated )
300
+ expectType < ExpectedProps [ 'object' ] > ( props . object )
296
301
297
302
// rawBindings
298
303
expectType < Number > ( rawBindings . setupA )
0 commit comments