Skip to content

tuples aren't inlined correctly #2932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hesxenon opened this issue Apr 8, 2025 · 2 comments
Closed

tuples aren't inlined correctly #2932

hesxenon opened this issue Apr 8, 2025 · 2 comments
Milestone

Comments

@hesxenon
Copy link

hesxenon commented Apr 8, 2025

Search terms

tuple

Expected Behavior

Should preserve names and container type, e.g. display the destructured tuple type as [start, end]: [start: number, end: number]

Actual Behavior

Treats the tuple as an object with numbered keys, displaying it like this

 __namedParameters: {
        "[unscopables]": {
            "[iterator]"?: boolean;
            "[unscopables]"?: boolean;
            concat?: boolean;
            copyWithin?: boolean;
            ...
        };
        "0": number;
        "1": number;
        length: 2;
        ...

Steps to reproduce the bug

/**
 * @inline
 */
type Vector2D = [start: number, end: number];

export function doStuff([start, end]: Vector2D) {}

Environment

  • Typedoc version: 0.28.2
  • TypeScript version: 5.8.3
  • Node.js version: 22.14.0
  • OS: Fedora 42
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 11, 2025

I'm beginning to deeply regret adding @inline... It's shaping up to be a constant whack-a-mole of bugs...

@hesxenon
Copy link
Author

hesxenon commented Apr 12, 2025 via email

@Gerrit0 Gerrit0 added this to the v0.28.3 milestone Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants