Skip to content

Perf regression in object destructuring with default values referencing other destructured members #48902

Closed
@damienmortini

Description

@damienmortini

VS Code Version:

  • Version: 1.66.2 (user setup)
  • Version: 1.67.0-insider (user setup)

OS:

  • Windows_NT x64 10.0.22000

Steps to Reproduce:

  1. Open this code
class GLTexture {
  constructor({
    gl,
    width,
    height,
    target = gl.TEXTURE_2D,
    internalFormat = gl.RGBA8 || gl.RGBA,
    format = gl.RGBA,
    type = gl.UNSIGNED_BYTE,
    autoGenerateMipmap = false,
    minFilter = autoGenerateMipmap ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR,
    magFilter = gl.LINEAR,
    wrapS = gl.REPEAT,
    wrapT = gl.REPEAT,
  }) {
  }
}
  1. See that after switching tabs or hovering on a property that IntelliSense isn't working and Loading IntelliSense Status in status bar starts spinning forever

Code_cb8oof7A1o
Code_k3e8RGnq39

I tried to isolate the issue that seems to be related to operators in constructor, but not always. Sometimes, it appears by commenting/uncommenting other lines.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-repros

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions