Skip to content

support event types in jsdoc #165

@43081j

Description

@43081j

The JSDoc parsing function:

function parseJsDocTagString(str: string): JsDocTagParsed {

assumes types are of this format:

/**
  @param {someType} someName someDescription
*/

which is fine, except for events. a common pattern when defining an event in JSDoc is:

/**
  @fires some-name {someType}
*/

for example, mwc does this. i do too.


related problem: if we have @fires my-event {MouseEvent}, it seems this function won't bother with it and will return any.

is there any chance at some point this could be able to somehow resolve global types? or would that be lit-analyzer's job to lookup in its store?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions