@@ -56,8 +56,8 @@ mount(AppWithDefine, {
5656} )
5757
5858expectError (
59- // @ts -expect-error wrong prop type should not compile
6059 mount ( AppWithDefine , {
60+ // @ts -expect-error wrong prop type should not compile
6161 props : { a : 2 }
6262 } )
6363)
@@ -186,14 +186,12 @@ declare const FunctionalComponentEmit: FunctionalComponent<
186186 level : number
187187 } ,
188188 { hello : ( foo : string , bar : string ) => void }
189- >
189+ >
190190
191191mount ( FunctionalComponent )
192192mount ( defineComponent ( FunctionalComponent ) )
193193
194194mount ( FunctionalComponentEmit )
195-
196- // @ts -ignore vue 3.0.2 doesn't work. FIX: https://github.com/vuejs/vue-next/pull/2494
197195mount ( defineComponent ( FunctionalComponentEmit ) )
198196
199197// class component
@@ -204,7 +202,7 @@ mount(defineComponent(FunctionalComponentEmit))
204202 }
205203} )
206204class ClassComponent extends Vue {
207- dataText : string = ''
205+ dataText = ''
208206 get computedMsg ( ) : string {
209207 return `Message: ${ ( this . $props as any ) . msg } `
210208 }
@@ -224,6 +222,7 @@ class CustomClassComponent<Props extends {} = {}> {
224222 private static __vccValue ?: ComponentOptions
225223 static get __vccOpts ( ) : ComponentOptions {
226224 if ( this . __vccValue ) return this . __vccValue
225+ // eslint-disable-next-line @typescript-eslint/no-this-alias
227226 const CompConstructor = this
228227 return ( this . __vccValue = {
229228 name : CompConstructor . name ,
@@ -279,14 +278,20 @@ class WithPropCustomClassComponent extends CustomClassComponent<CustomClassCompo
279278}
280279
281280expectError (
282- // @ts -expect-error should has props error
283- mount < WithPropCustomClassComponent , CustomClassComponentProps > ( WithPropCustomClassComponent , {
284- props : { }
285- } )
281+ mount < WithPropCustomClassComponent , CustomClassComponentProps > (
282+ // @ts -expect-error should has props error
283+ WithPropCustomClassComponent ,
284+ {
285+ props : { }
286+ }
287+ )
288+ )
289+ mount < WithPropCustomClassComponent , CustomClassComponentProps > (
290+ WithPropCustomClassComponent ,
291+ {
292+ props : { size : 'small' }
293+ }
286294)
287- mount < WithPropCustomClassComponent , CustomClassComponentProps > ( WithPropCustomClassComponent , {
288- props : { size : 'small' }
289- } )
290295
291296// endregion
292297
@@ -313,7 +318,6 @@ mount(Foo, {
313318
314319expectError (
315320 mount (
316- // @ts -expect-error
317321 defineComponent ( {
318322 props : {
319323 baz : String ,
@@ -324,6 +328,7 @@ expectError(
324328 }
325329 } ) ,
326330 {
331+ // @ts -expect-error
327332 props : {
328333 baz : 'hello'
329334 }
0 commit comments