Skip to content

Variable names from rest-destructured declarations marked as unused in modules #13076

Description

@DanielRosenwasser

From #13048 (comment) and as a continuation of #12766, the following causes unused local errors where marked when using --noUnusedLocals.

declare let props: any;
const {
  children, // here!
  active: _a, // here!
  ...rest,
} = props;

function foo() {
  const {
    children,
    active: _a,
    ...rest,
  } = props;
}

export const asdf = 123;

image

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions