Skip to content

Incorrect quick fix for "use element access" #41786

Closed

Description

// @noPropertyAccessFromIndexSignature: true

declare let x: { y: { [x: string]: string } };

x.y.yadda/**/;

Request quick fixes here.

Current behavior*:

Quick fix is suggested for y, the code results in

declare let x: { y: { [x: string]: string } };

x["y"].yadda;

Expected:

Quick fix is suggested for yadda, the code results in

declare let x: { y: { [x: string]: string } };

x.y["yadda"];

Activity

  1. added
    Bug
    Effort: Moderate
    Domain: LS: Quick Fixes
    on Dec 2, 2020
  2. Kingwl commented on Dec 3, 2020

    @Kingwl
    Contributor

    Wow.....

  3. added
    Fix Available
    on Dec 3, 2020
  4. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDomain: LS: Quick FixesEffort: ModerateFix Available

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions