microsoft / TypeScript-Vue-Starter

A starter template for TypeScript and Vue with a detailed README describing how to use the two together.
MIT License
4.45k stars 592 forks source link

识别props的数据类型全部为any,是否应该改下? #26

Closed yangdan8 closed 7 years ago

yangdan8 commented 7 years ago

props: { name: String, initialEnthusiasm: Number },

DanielRosenwasser commented 7 years ago

Sorry, unfortunately I won't be able to answer questions in languages other than English.

I can be more explicit on props inference now that Vue 2.5 is out, but I should warn you that anything more complex than String, Number, Boolean, or instances of classes is going to give you trouble.


抱歉,我将无法用英语以外的语言回答问题。

现在Vue 2.5已经出来,我可以更明确的道具推理,但是我应该提醒你,比“String”,“Number”,“Boolean”或类的实例更复杂的任务会给你带来麻烦。