@@ -66,7 +66,7 @@ const AppWithProps = {
6666 props : {
6767 a : {
6868 type : String ,
69- required : true
69+ required : true as true
7070 }
7171 } ,
7272 template : ''
@@ -91,7 +91,7 @@ expectError(
9191)
9292
9393const AppWithArrayProps = {
94- props : [ 'a' ] ,
94+ props : [ 'a' ] as [ 'a' ] ,
9595 template : ''
9696}
9797
@@ -134,16 +134,16 @@ mount(AppWithoutProps, {
134134// Functional tests
135135
136136expectError (
137- mount ( ( props : { a : 1 } ) => { } , {
137+ mount ( ( props : { a : 1 } ) => { } , {
138138 props : {
139139 // @ts -expect-error wrong props
140- a : '222'
140+ a : '222'
141141 }
142142 } )
143143)
144144
145145expectType < number > (
146- mount ( ( props : { a : number } , ctx : any ) => { } , {
146+ mount ( ( props : { a : number } , ctx : any ) => { } , {
147147 props : {
148148 a : 22
149149 }
@@ -247,7 +247,7 @@ class CustomClassComponent<Props extends {} = {}> {
247247 return this . props
248248 }
249249 context : SetupContext
250- render ( ) : VNodeChild { }
250+ render ( ) : VNodeChild { }
251251}
252252class NoPropCustomClassComponent extends CustomClassComponent {
253253 count = ref ( 0 )
@@ -281,15 +281,17 @@ class WithPropCustomClassComponent extends CustomClassComponent<CustomClassCompo
281281
282282expectError (
283283 mount (
284- WithPropCustomClassComponent as typeof WithPropCustomClassComponent & ( new ( ) => { $props : CustomClassComponentProps } ) ,
284+ WithPropCustomClassComponent as typeof WithPropCustomClassComponent &
285+ ( new ( ) => { $props : CustomClassComponentProps } ) ,
285286 {
286287 // @ts -expect-error should has props error
287288 props : { }
288289 }
289290 )
290291)
291292mount (
292- WithPropCustomClassComponent as typeof WithPropCustomClassComponent & ( new ( ) => { $props : CustomClassComponentProps } ) ,
293+ WithPropCustomClassComponent as typeof WithPropCustomClassComponent &
294+ ( new ( ) => { $props : CustomClassComponentProps } ) ,
293295 {
294296 props : { size : 'small' }
295297 }
0 commit comments