@@ -28,6 +28,7 @@ describe('with object props', () => {
2828 ffff : ( a : number , b : string ) => { a : boolean }
2929 validated ?: string
3030 date : Date
31+ unknown : unknown
3132 }
3233
3334 type GT = string & { __brand : unknown }
@@ -100,6 +101,10 @@ describe('with object props', () => {
100101 type : Date ,
101102 required : true ,
102103 } ,
104+ unknown : {
105+ type : Object as PropType < unknown > ,
106+ default : null ,
107+ } ,
103108 } ,
104109 setup ( props ) {
105110 // type assertion. See https://github.com/SamVerschueren/tsd
@@ -121,6 +126,7 @@ describe('with object props', () => {
121126 expectType < ExpectedProps [ 'ffff' ] > ( props . ffff )
122127 expectType < ExpectedProps [ 'validated' ] > ( props . validated )
123128 expectType < ExpectedProps [ 'date' ] > ( props . date )
129+ expectType < typeof props . unknown > ( { } as ExpectedProps [ 'unknown' ] )
124130
125131 isNotAnyOrUndefined ( props . a )
126132 isNotAnyOrUndefined ( props . b )
@@ -171,6 +177,7 @@ describe('with object props', () => {
171177 expectType < ExpectedProps [ 'hhh' ] > ( props . hhh )
172178 expectType < ExpectedProps [ 'ffff' ] > ( props . ffff )
173179 expectType < ExpectedProps [ 'validated' ] > ( props . validated )
180+ expectType < typeof props . unknown > ( { } as ExpectedProps [ 'unknown' ] )
174181
175182 // @ts -expect-error props should be readonly
176183 expectError ( ( props . a = 1 ) )
0 commit comments