Subscribe on changes!

types: DefineComponent turns `any` props into `unknown`

avatar
Nov 22nd 2021

Version

3.2.22

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Using Typescript, define a props typed as any. Try to access random members in template.

image

What is expected?

No compilation error

What is actually happening?

Typescript complains, because the props is of type unknown


Downstream issue in Volar: johnsoncodehk/volar#713 @johnsoncodehk traced the issue to be in defineComponent typings.