Skip to content

Properties with index signatures formatted incorrectly #2917

Closed
@Blackbaud-SteveBrush

Description

@Blackbaud-SteveBrush

Search terms

index signatures, formatting

Expected Behavior

First of all, I just wanted to say "Thank You" for this awesome utility; our team uses the JavaScript API to document over 75 TypeScript libraries.

Given the following interface...

export interface Foo {
  data: {
    [key: string]: any;
  }
}

I would expect the data property's index signature toString() method to output [key: string]: any;.

Actual Behavior

TypeDoc 0.28.1 outputs (key: string) => any;, without the square brakets.

Steps to reproduce the bug

Clone the following (minimal) repo: https://github.com/Blackbaud-SteveBrush/typedoc-playground

Run npm install && node ./run-typedoc.mjs and observe the output.

TypeDoc: 0.28.0-beta.2
TypeScript: 5.7.3
OS: Mac, Sequoia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions