Skip to content

Destructured function does not show outline of inner function parameters #63551

@aiday-mar

Description

@aiday-mar

🔎 Search Terms

outline model

🕗 Version & Regression Information

  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

// Your code here

🙁 Actual behavior

Essentially for the code:

export const [var1, var2] = processLightDarkTokens({
  a : {
    b : {

    }
  },
  c : {

  }
});

The outline model returned by TypeScript does not show a, b and c. But for:

export const abc = processLightDarkTokens({
  a : {
    b : {

    }
  },
  c : {

  }
});

It does.

🙂 Expected behavior

I would expect a, b, and c to be visible in the outline model in both cases.

Additional information about the issue

Hi, I am a developer on the VS Code team, and I recently received the following bug : microsoft/vscode#241563. The bug is that the VS Code editor sticky scroll does not display the expected sticky lines. This happens because the outline model returned by the TypeScript server changes unexpectedly depending on if the function return variable is destructured or not. I attach a screen recording here to show the issue.

Essentially for the code:

export const [var1, var2] = processLightDarkTokens({
  a : {
    b : {

    }
  },
  c : {

  }
});

The outline does not show a, b and c. But for:

export const abc = processLightDarkTokens({
  a : {
    b : {

    }
  },
  c : {

  }
});

It does. Is this expected?

Screen.Recording.2026-06-12.at.17.46.27.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions