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

Fails to parse imported JSDoc types

Open bennypowers opened this issue 6 years ago • 1 comments

This file

import { svg, LitElement } from 'lit-element';

/** @typedef {import('lit-element').SVGTemplateResult} SVGTemplateResult */

/**
 * @element
 */
class FailedParse extends LitElement {
  /**
   * @param {string} name
   * @return {SVGTemplateResult}
   */
  svgTemplate(name) {
    return svg`<svg id="${name}"></svg>`;
  }
}

Fails to parse.

Removing the imported typedef allows it to parse properly.

bennypowers avatar Sep 18 '19 06:09 bennypowers

@runem Could you add support for @typedef?

https://jsdoc.app/tags-typedef.html

JosefJezek avatar Nov 10 '20 15:11 JosefJezek