Skip to content

'Add missing function decoration' quick fix can duplicate //@ts-check comment #43006

Closed
@mjbvz

Description

@mjbvz

Bug Report

🔎 Search Terms

  • ts check
  • quick fix
  • code action

🕗 Version & Regression Information

4.3.0-dev.20210228

💻 Code

For the javascript:

//@ts-check

add(1, 2);

Use add missing function declaration on add

🙁 Actual behavior

The ts check comment is duplicated

//@ts-check

add(1, 2);
function //@ts-check
    add(arg0, arg1) {
        throw new Error("Function not implemented.");
}

🙂 Expected behavior

//@ts-check

add(1, 2);
function add(arg0, arg1) {
        throw new Error("Function not implemented.");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Fix AvailableA PR has been opened for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions