fix(component): use both type
and optionalTypes
to infer property type
#98
+29
−33
type
and optionalTypes
to infer property type
#98