web-component-analyzer icon indicating copy to clipboard operation
web-component-analyzer copied to clipboard

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

Open web-padawan opened this issue 5 years ago • 0 comments

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>}
 */

web-padawan avatar Dec 23 '19 11:12 web-padawan