Skip to content

Fix support for arrow function doc extraction #19

@chrisvxd

Description

@chrisvxd

JS Docs aren't extracted when using exporting default arrow functions

/**
 * This is an example description for an example function.
 *
 * @param foo - Example describing string `foo`.
 * @returns Description of return value.
 */
export default async (foo: string): Promise<string> => {
  return JSON.stringify({ foo })
}

Method description and params are missing from output. After some investigation, it seems ts-morph isn't picking up the docs, so getJsDocs() returns an empty array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions