runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
501 stars 63 forks source link

Support Array<Type> vs Type[] in JSON output #136

Open web-padawan opened 4 years ago

web-padawan commented 4 years ago

This might not be a bug, but rather unexpected behavior. So, I have this property:

  get items(): Array<VaadinAccordionPanel> {
    return super.items as Array<VaadinAccordionPanel>;
  }

Which produces the following JSON:

{
  "name": "items",
  "type": "VaadinAccordionPanel[]"
},

IMO the expected behavior here would be to preserve Array<Type> notation. Currently I have to add a following JSDoc in order to enforce this notation:

/**
 * @type {Array<VaadinAccordionPanel>}
 */