Skip to content

Quick fix "add missing properties" fails with enums from other moduleΒ #60186

@chiawendt

Description

@chiawendt

πŸ”Ž Search Terms

"quick fix", "add missing property", "enum"

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

⏯ Playground Link

No response

πŸ’» Code

// @filename: E.ts
export enum E {
    A,
    B
}

// @filename: index.ts
import { E } from "./E"
type T = {
    e: E 
}

const t:T = {} 

// apply "add missing properties" quick fix on `t` 

πŸ™ Actual behavior

fixed to:

const t:T = {
  e: "file:///E".A
} 

πŸ™‚ Expected behavior

No syntax error

Additional information about the issue

Workbench Repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: LS: Quick FixesEditor-provided fixes, often called code actions.FixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions