Skip to content

function fields do not get documented #2436

Closed
@teidesu

Description

@teidesu

Search terms

when describing a function with fields using typescript const declarations, the fields are not getting documented:

/** The FOO function */
function foo() {
    return "foo";
}

function bugInner(): { foo: string } {
    return { foo: "bar" }
}

/**
 * The BUG function
 */
export const bug: {
    (): { foo: string }
    foo: typeof foo
    bar: 42
} = Object.assign(bugInner, {
    foo,
    bar: 42 as const,
});

Expected Behavior

fields get documented

Actual Behavior

fields are not documented, only the root function (bug) gets documented:
image

Steps to reproduce the bug

TypeStrong/typedoc-repros#34

Environment

  • Typedoc version: 0.25.3
  • TypeScript version: 5.2.2
  • Node.js version: 18.12.1
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions